A young Japanese man went on a stabbing rampage Tuesday at a facility for the mentally disabled where he had been fired, police said, killing 19 people months after he gave a letter to Parliament outlining the bloody plan and saying all disabled people should be put to death.

When he was done, Satoshi Uematsu, 26, had left dead or injured nearly a third of the almost 150 patients at the facility in a matter of 40 minutes in the early Tuesday attack, the deadliest mass killing in Japan in decades. Twenty-five were wounded, 20 of them seriously.

He drove up in a black car, carrying several knives to the Tsukui Yamayuri-en facility in Sagamihara, 50 kilometres west of Tokyo, according to security camera footage played on TV news programs. He broke in by shattering a window at 2:10 a.m., according to a prefectural health official, and then set about slashing the patients' throats.

Details of how he did that, and if the victims were asleep or otherwise helpless, were not immediately known, although a cryptic letter he sent to Japan's Parliament in February gave a peek into Uematsu's dark turmoil.

He calmly turned himself in about two hours after the attack, police said.

Former employee

Tsukui Yamayuri-en, which means mountain lily garden, was a facility Uematsu knew well, having worked there since 2012 until he was let go in February.

He knew the staffing would be down to just a handful in the wee hours of the morning, Japanese media reports said.

Not much is known yet about his background, but Uematsu once dreamed of becoming a teacher. In two group photos posted on his Facebook, he looks happy, smiling widely with other young men.

"It was so much fun today. Thank you, all. Now I am 23, but please be friends forever," a 2013 post says.

But somewhere along the way, things went terribly awry.

Uematsu began to tell people around him that disabled people needed to be killed. In February, he tried to hand deliver a letter he wrote to Parliament's lower house speaker demanding all disabled people be put to death through "a world that allows for mercy killing," Kyodo news agency and TBS TV reported.

Attack outlined

Uematsu boasted in the letter that he had the ability to kill 470 disabled people in what he called "a revolution," and outlined an attack on two facilities, after which he said he will turn himself in.

He also asked he be judged innocent on grounds of insanity, be given $5 million US in aid and plastic surgery so he could lead a normal life afterward.

The letter was reprinted by Kyodo after the attack.

"My reasoning is that I may be able to revitalize the world economy and I thought it may be possible to prevent World War III," the rambling letter says.

The letter, which the Tokyo police got, included Uematsu's name, address and telephone number, and reports of his threats were relayed to local police where Uematsu lived, Kyodo said.

Kanagawa Gov. Yuji Kuroiwa apologized for having failed to act on the warning signs.

From his time working at the facility, Uematsu was known to people in the area, and some said he was so polite and upstanding that they found the news shocking.

'Ordinary young fellow'

Akihiro Hasegawa, who lived next door to Uematsu, said he heard Uematsu had gotten in trouble with the facility, initially over sporting a tattoo, often frowned upon in mainstream Japanese society because of its association with criminal groups.

"He was just an ordinary young fellow," he said.

Yasuyuki Deguchi, a criminologist, said Uematsu's actions were typical of someone who bears a grudge and seeks revenge, because it appeared he planned out the attack, and then he turned himself into police.

"Accomplishing his goal was all he wanted," Deguchi said on TV Asahi.

Michael Gillan Peckitt, a lecturer in clinical philosophy at Osaka University in central Japan, and an expert on disabled people's issues in Japan, said the attack speaks more about Uematsu than the treatment of the disabled in Japan.

"It highlights the need for an early-intervention system in the Japanese mental health system. Someone doesn't get to that state without some symptoms of mental illness," he said.

Mass killings are rare in Japan. Because of the country's extremely strict gun-control laws, any attacker usually resorts to stabbings. In 2008, seven people were killed by a man who slammed a truck into a crowd of people in central Tokyo's Akihabara electronics district and then stabbed passers-by.

In 2001, a man killed eight children and injured 13 others in a knife attack at an elementary school in Osaka. The incident shocked Japan and led to increased security at schools.

As recent as earlier this month, a man stabbed four people at a library in northeastern Japan, allegedly over their improper handling of his questions, although no one died.

In 2010, 14 were injured by an unemployed man who stabbed and beat up passengers on two public buses outside a Japanese train station in Ibaraki Prefecture, about 40 kilometres northeast of Tokyo.