NARA, Japan (AP) — Japan’s NHK television says former Prime Minister Shinzo Abe has died after being shot during a campaign speech.

Abe was shot from behind minutes after he started his speech Friday in Nara in western Japan. He was airlifted to a hospital for emergency treatment but was not breathing and his heart had stopped. He was pronounced dead later at the hospital.

The 67-year-old Abe was Japan’s longest-serving leader before stepping 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.

THIS IS A BREAKING NEWS UPDATE. AP’s earlier story follows below.

NARA, Japan (AP) — Former Japanese Prime Minister Shinzo Abe, a divisive arch-conservative and one of his nation’s most powerful and influential figures, was shot and critically wounded during a campaign speech Friday in western Japan. He was airlifted to a hospital but officials said he was not breathing and his heart had stopped.

Police arrested the suspected gunman at the scene of an attack that shocked many in Japan, which is one of the world’s safest nations and has some of the strictest gun control laws anywhere.

Prime Minister Fumio Kishida said Abe was in “grave condition” and he hoped he would survive. Kishida and his Cabinet ministers hastily returned to Tokyo from campaign events around the country after the shooting, which he called “dastardly and barbaric.”

“I’m praying for former Prime Minister Abe’s survival from the bottom of my heart,” Kishida told reporters at his office.

Abe, 67, who was Japan’s longest-serving leader before stepping down in 2020, was in cardio and pulmonary arrest as he was airlifted to the hospital, local fire department official Makoto Morimoto said.

Public broadcaster NHK aired a dramatic video of Abe giving a speech outside a train station in the western city of Nara. He is standing, dressed in a navy blue suit, raising his fist, when two gunshots are heard. The video then shows Abe collapsed on the street, with security guards running toward him. He holds his chest, his shirt smeared with blood.

In the next moment, security guards leap on top of a man in gray shirt who lies face down on the pavement. A double-barreled device that appeared to be a handmade gun is seen on the ground.

Nara prefectural police confirmed the arrest of Tetsuya Yamagami, 41, on suspicion of attempted murder. NHK reported that the suspect served in the Maritime Self-Defense Force for three years in the 2000s.

Other videos from the scene showed campaign officials surrounding Abe. The former leader is still highly influential in the governing Liberal Democratic Party and heads its largest faction, Seiwakai. Elections for Japan’s upper house, the less powerful chamber of its parliament, are Sunday.

Opposition leaders condemned the attack as a challenge to Japan’s democracy and prayed for Abe’s recovery. In Tokyo, people stopped on the street to grab extra editions of newspapers or watch TV coverage of the shooting.

“I use the harshest words to condemn (the act),” Kishida said as he struggled to control his emotions. He said the government planned to review the security situation, but added that Abe had the highest protection.

When he resigned as prime minister, Abe said he had a recurrence of the ulcerative colitis he’d had since he was a teenager.

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 riled the Koreas and China, and his push to create what he saw as a more normal defense posture angered many Japanese. Abe failed to achieve his cherished goal of formally rewriting the U.S.-drafted pacifist constitution because of poor public support.

Loyalists said that his legacy was a stronger U.S.-Japan relationship that was meant to bolster Japan’s defense capability. But Abe made enemies by forcing his defense goals and other contentious issues through parliament, despite strong public opposition.

Abe is a political blue blood who was groomed to follow in the footsteps of his grandfather, former Prime Minister Nobusuke Kishi. His political rhetoric often focused on making Japan a “normal” and “beautiful” nation with a stronger military and bigger role in international affairs.

Many foreign officials expressed shock over the shooting.

In response to a question, Chinese Foreign Ministry Zhao Lijian said China is “following the development of the situation and hope that former Prime Minister Abe will be out of danger and recover swiftly.”

“Our thoughts, our prayers are with him, with his family, with the people of Japan,” Secretary of State Antony Blinken said while attending a Group of 20 foreign ministers meeting in Bali, Indonesia.

Abe said he was proud of working while leader for a stronger Japan-U.S. security alliance and shepherding the first visit by a serving U.S. president to the atom-bombed city of Hiroshima. He also helped Tokyo gain the right to host the 2020 Olympics by pledging that a disaster at the Fukushima nuclear plant was “under control” when it was not.

Abe became Japan’s youngest prime minister in 2006, at age 52, but his overly nationalistic first stint abruptly ended a year later, also because of his health.

The end of Abe’s scandal-laden first stint as prime minister was the beginning of six years of annual leadership change, remembered as an era of “revolving door” politics that lacked stability and long-term policies.

When he returned to office in 2012, Abe vowed to revitalize the nation and get its economy out of its deflationary doldrums with his “Abenomics” formula, which combines fiscal stimulus, monetary easing and structural reforms.

He won six national elections and built a rock-solid grip on power, bolstering Japan’s defense role and capability and its security alliance with the U.S. He also stepped up patriotic education at schools and raised Japan’s international profile.