TOKYO (AP) — Japanese prosecutors formally charged the suspect in the assassination of former Prime Minister Shinzo Abe with murder, sending him to stand trial, a court said Friday.

Tetsuya Yamagami was arrested immediately after allegedly shooting Abe with a homemade gun as the former leader was making a campaign speech in July outside a train station in Nara in western Japan. He then underwent a nearly six-month mental evaluation, which prosecutors said showed he is fit to stand trial.

Yamagami was also charged with violating a gun control law, according to the Nara District Court.

Police have said Yamagami told them that he killed Abe, one of Japan’s most influential and divisive politicians, because of Abe’s apparent links to a religious group that he hated. In his statements and in social media postings attributed to him, Yamagami said he developed a grudge because his mother had made massive donations to the Unification Church that bankrupted his family and ruined his life.

One of his lawyers, Masaaki Furukawa, told The Associated Press on Thursday that Yamagami will have to take responsibility for the serious consequences of his alleged actions and that his defense lawyers will do their best to reduce his sentence.

Japanese law allows capital punishment for murder, but experts say the death penalty usually is handed down for multiple killings and Yamagami could get life in prison if convicted.

No date is set for his trial, which is expected to have a panel of civil jurors in addition to the usual bench judges — as in murder cases and other serious criminal trials in Japan. Due to the complexity of the case, it would take months before his trial begins, Furukawa said.

Police are also reportedly considering adding several allegations, including producing weapons, violating explosives control law and causing damage to buildings.

Some Japanese have expressed sympathy for Yamagami, especially those who also suffered as children of followers of the South Korea-based Unification Church, which is known for pressuring adherents into making big donations and is considered a cult in Japan.

Thousands of people have signed a petition requesting leniency for Yamagami, and others have sent care packages to his relatives or the detention center.

The investigation into the case has led to revelations of years of cozy ties between Abe’s governing Liberal Democratic Party and the church since Abe’s grandfather, former Prime Minister Nobusuke Kishi, helped the church take root in Japan in the 1960s over shared interests in conservative and anti-communist causes.

Current Prime Minister Fumio Kishida’s popularity has plunged over his handling of the church controversy and for insisting on holding a rare, controversial state funeral for Abe.

To remove ministers with church ties, Kishida shuffled his Cabinet in August but a subsequent release of the party investigation in September showed church ties among nearly half of its 400 national lawmakers.

Kishida, who said has no relations with the church, promised that his party lawmakers will cut ties with the group, and his government has begun an investigation that could possibly revoke the church’s religious status.

The government also adopted a law designed to help victims of the church’s fundraising practices, though experts says the measure is insufficient.