UPDATE 20-Gunman assassinates Japan ex-PM Abe on campaign trail

* PM Kishida denounces attack on "foundation of democracy"

* Police arrest suspect at the scene of attack

* Police say attacker used homemade gun

* Political violence rare, guns tightly controlled in Japan (Adds details on suspect)

By Satoshi Sugiyama and Chang-Ran Kim

NARA, Japan, July 8 (Reuters) - Former Prime Minister Shinzo Abe, the longest-serving leader of modern Japan, was gunned down on Friday while campaigning for a parliamentary election, shocking a country where guns are tightly controlled and political violence almost unthinkable.

Abe, 67, was pronounced dead around five and a half hours after the shooting in the city of Nara. Police arrested a 41-year-old man and said the weapon was a homemade gun.

"I am simply speechless over the news of Abe's death," Prime Minister Fumio Kishida, Abe's protege, told reporters.

Earlier, as Abe still lay in hospital where doctors tried to revive him, Kishida struggled to keep his emotions in check.

"This attack is an act of brutality that happened during the elections - the very foundation of our democracy - and is absolutely unforgivable," he said.

Abe had been making a campaign speech outside a train station when two shots rang out. Security officials were then seen tackling a man in a grey T-shirt and beige trousers.

"There was a loud bang and then smoke," businessman Makoto Ichikawa, who was at the scene, told Reuters. "The first shot, no one knew what was going on, but after the second shot, what looked like special police tackled him."

Kyodo news service published a photograph of Abe lying face-up on the street by a guardrail, blood on his white shirt. People were crowded around him, one administering heart massage.

Abe was taken to hospital in cardiopulmonary arrest and showing no vital signs. He was declared dead at 5:03 p.m. (0803 GMT), having bled to death from deep wounds to the heart and the right side of his neck.

He had received more than 100 units of blood in transfusions over four hours, Hidetada Fukushima, the professor in charge of emergency medicine at Nara Medical University Hospital, told a televised news conference.

Police said the gunman had admitted to shooting Abe with a handmade firearm he had fashioned out of metal and wood.

Media reported his name as Tetsuya Yamagami. Police said he was a Nara resident who worked at Japan's Maritime Self-Defence Forces for three years but now appeared to be unemployed. They were investigating whether he had acted alone.

Investigators found "several" other handmade guns at his one-room flat in Nara city, police added.