The man who fatally shot former Prime Minister Shinzo Abe checked YouTube when making the firearm used in the attack on Japan's longest-serving leader, investigative sources said Sunday.

The sources also said Tetsuya Yamagami, 41, has stated that he tested a homemade gun at a facility connected to a religious group he harbored a grudge against. Yamagami has said his mother made a "huge donation" to the organization, which he believes Abe was associated with.

Photo taken from a Kyodo News helicopter shows a police vehicle (C) carrying Tetsuya Yamagami, the man who fatally shot former Japanese Prime Minister Shinzo Abe, leaving a police station in Nara, western Japan, on July 10, 2022, as he is sent to prosecutors on suspicion of murder. (Kyodo) ==Kyodo

The Nara prefectural police believe he was testing the weapon ahead of a planned attack. Yamagami fatally shot the 67-year-old Abe on Friday as he was delivering a House of Councillors election stump speech outside a train station in the western Japan city of Nara, just two days before voters went to the polls.

Yamagami has denied that the shooting was politically motivated, telling police he chose to make an attempt on the former Liberal Democratic Party leader's life after initially planning to target an executive of the group.

Multiple homemade guns similar to the one used to kill Abe were confiscated from Yamagami's home and the prefectural police said it appears he checked YouTube in repeated attempts to make firearms.

The sources also said the gun Yamagami made to shoot Abe was "designed to fire six projectiles at a time." Composed of two metal pipes held together with tape and employing projectiles placed in small plastic shells fired from both barrels, the weapon was comparable to a shotgun, they said.

The sources also said multiple wooden boards, measuring around 1 square meter each, with holes apparently made during weapon testing were found in Yamagami's car.

The suspect has said an aluminum-covered tray found in the vehicle was used to "dry gunpowder," according to the sources. Yamagami was also quoted as saying he had attempted to make a bomb and he appears to have gone through a process of trial and error to produce such a device.

A former member of the Maritime Self-Defense Force, Yamagami was arrested at the scene of the shooting and has told police he "made multiple guns." He was sent to prosecutors Sunday on suspicion of murder.

Abe died of blood loss, with an autopsy determining there were two gunshot wounds, one to his upper left arm and another to his neck.

The suspect has told police he "wandered around" the vicinity of Kintetsu Railway's Yamato-Saidaiji Station before Abe began speaking.

Security camera footage from the station and elsewhere showed him arriving at around 10 a.m., about an hour and a half before the shooting and he was also captured entering multiple shops.

Related coverage:

Abe killer tested homemade gun at religious group's facility: sources

Ex-colleagues call Abe shooter "totally ordinary," shocked over act

Abe shooter cites grudge against religious body over big donation