The man accused of assassinating former Japanese prime minister Shinzo Abe has apologised to the ex-leader's family for the first time.

Tetsuya Yamagami, who earlier pleaded guilty to murder, told the court on Thursday that he felt "deeply sorry" towards Abe's widow, Akie.

Yamagami used a homemade gun to shoot Abe during a political campaign event in the western city of Nara on 8 July 2022. He died in the hospital on the same day.

Abe's death sent shockwaves around the world. He was known for his hawkish foreign policy and a signature economic strategy that popularly came to be known as "Abenomics".

"I have caused [the family] three and a half years of suffering... I have no excuse," Yamagami told the court on Thursday, according to local media.