The man who killed Japan's former prime minister Shinzo Abe has been sentenced to life in prison, three and a half years after he shot him dead at a rally in the city of Nara in 2022.

Tetsuya Yamagami had pleaded guilty to murder charges at the trial's opening last year, but how he should be punished has divided public opinion in Japan. While many see the 45-year-old as a cold-blooded murderer, some sympathize with his troubled upbringing.

Prosecutors said Yamagami deserved life imprisonment for his grave act. Abe's assassination stunned the country, where there is virtually no gun crime.

Seeking leniency, Yamagami's defense team claimed he was a victim of religious abuse. His mother’s devotion to the Unification Church bankrupted the family, and Yamagami bore a grudge against Abe after learning of the ex-leader's ties to the controversial church, the court heard.

On Wednesday, Judge Shinichi Tanaka from the Nara district court sentenced Yamagami to life in prison without parole, as the prosecution had requested. The act of waiting for an opportunity, finding an opening, and targeting the victim with a gun is despicable and extremely malicious, said the judge, public broadcaster NHK reports.

Yamagami sat quietly with his hands clasped and eyes downcast as the sentence was handed down. Nearly 700 people had lined up in the cold to try to get one of the 31 seats inside the courtroom to attend the hearing.

Abe's shocking death in broad daylight prompted investigations into the Unification Church and its questionable practices, including soliciting financially ruinous donations from its followers, resulting in a deeper scrutiny of ties between the organization and Japan's ruling political figures.

Armed with a homemade gun assembled using two metal pipes and duct tape, he fired two shots at Abe during a political campaign event in Nara on 8 July 2022. The murder of Japan's most recognizable public figure – Abe still holds the record as the longest-serving PM in Japanese history – sent shockwaves around the world.

Yamagami's case illustrates the complex interplay of personal grievances and broader societal issues, sparking a national conversation on the influence of the Unification Church in Japan and its impact on families.