Former Japanese prime minister Shinzo Abe has died after being shot during a campaign speech, according to NHK television. 

Abe, the country's longest-serving leader, was shot from behind minutes after he started his speech on Friday in Nara in western Japan.

He was airlifted to a hospital for emergency treatment but was not breathing and his heart had stopped.

The 67-year-old was pronounced dead later at the hospital.

He had stepped down for health reasons in 2020.

Police arrested the suspected gunman at the scene of the attack, which shocked people in a country known as one of the world’s safest.

Current Prime Minister Fumio Kishida called the attack “dastardly and barbaric”, and said that it was “absolutely unforgivable” that the crime had taken place during the election campaign.

The public broadcaster NHK aired footage showing Abe collapsed on the street, with several security guards running toward him. He was bleeding and holding his chest.

Japan’s chief cabinet secretary Hirokazu Matsuno told reporters: “A barbaric act like this is absolutely unforgivable, no matter what the reasons are, and we condemn it strongly.”

The popular former leader was still influential in the governing Liberal Democratic Party and headed its largest faction, Seiwakai.

Elections for Japan’s upper house, the less powerful chamber of its parliament, will take place on Sunday.

Abe was giving a speech when people heard gunshots. He was holding his chest when he collapsed, his shirt smeared with blood, but was able to speak before he fell unconscious.

The attack was a shock in a country that’s one of the world’s safest and with some of the strictest gun control laws anywhere.

The Yomiuri Shimbun newspaper printed extra editions, which were quickly grabbed by people on the street to read about the shooting.

Nara, once the capital of Japan, is just to the east of Osaka on the country’s main Honshu island.

Abe stepped down in 2020 because he said a chronic health problem has resurfaced. He had lived with ulcerative colitis since he was a teenager and said the condition could be controlled with treatment.

He told reporters at the time that it was “gut-wrenching” to leave many of his goals unfinished.

He spoke of his failure to resolve the issue of Japanese abducted years ago by North Korea, a territorial dispute with Russia and a revision of Japan’s war-renouncing constitution.

That last goal was a big reason he was such a divisive figure.

His ultra-nationalism had riled the Koreas and China, and his push to normalise Japan’s defence posture had angered many in the country.

Abe failed to achieve his cherished goal of formally rewriting the US-drafted pacifist constitution because of poor public support.