India's Supreme Court on Wednesday ordered the release of AG Perarivalan, who spent 31 years in jail in connection with the Rajiv Gandhi assassination case.

AG Perarivalan was one of the seven persons convicted in the case and was 19 years old when he was arrested. He was initially given the death penalty, but the sentence was later commuted to life in 2014.

He had been put behind bars for buying batteries for the bomb used to assassinate India's former Prime Minister Rajiv Gandhi in Tamil Nadu in 1991, according to a report in The Independent.

#WATCH | Visuals of #AGPerarivalan and his family celebrating after the Supreme Court ordered his release on Wednesday.

Follow live updates here: https://t.co/6sKuGyLCYv pic.twitter.com/1G5jxxsgKs

— The Indian Express (@IndianExpress) May 18, 2022

The apex court invoked the power granted under Article 142 of the Indian Constitution to grant relief to Perarivalan. Article 142 empowers the top court to pass a decree or order "for doing complete justice in any cause or matter pending before it," according to local new portal The Wire.

The court also took into account Perarivalan's exemplary conduct in jail. He had earned several academic qualifications during his time in jail. He authored a book, did a Diploma in Electronics and Communication Engineering and completed his MCA.

Perarivalan had maintained all along that he had no idea for what purpose he was asked to get the batteries. Addressing the media after the verdict, he said that it was "honesty" which gave him and his mother the strength to continue to fight. He had been out on parole since March 9 this year.

"She (his mother Arputhammal) has faced lots of humiliations, insult and pain over these years. Despite that, she has fought for justice for 31 years. The honesty in [this] case was what gave both of us the strength to fight this battle. The verdict is a victory for her struggle," he said.

The Congress party, run by the Gandhi family for decades, has expressed displeasure over his release saying that "a terrorist is a terrorist and should be treated as one."

"Today, we are deeply pained and disappointed at the decision of the Supreme Court ordering the release of Rajiv Gandhi's assassin," Congress chief spokesperson Randeep Surjewala said.

Rajiv Gandhi
Rajiv Gandhi was assassinated by female Tamil Tiger member Thenmozhi Rajaratnam Getty