The 26-year-old man, who reportedly threatened to kill hundreds of disabled people earlier this year, later turned himself in at a police station, admitting to officers: "I did it."
A knife-wielding former employee killed 19 people and injured 25 at a care centre for the mentally disabled in Japan on Tuesday, in the country's worst mass killing in decades.
The 26-year-old man, who reportedly threatened to kill hundreds of disabled people earlier this year, later turned himself in at a police station, admitting to officers: "I did it." He reportedly also said: "The disabled should all disappear."
Authorities identified the attacker as Satoshi Uematsu and said he had worked at the facility in Sagamihara, a city of more than 700,000 people west of Tokyo, until February.
Broadcaster NTV said the man told police he had been fired and held a grudge against the care centre.
The attack began in the early hours of the morning when Uematsu allegedly broke a first-floor window to get into the building. Public broadcaster NHK reported that he tied up one caregiver before starting to stab the residents.
A doctor at one of the hospitals where victims were taken said some had "deep stab" wounds to the neck.
"The patients are very shocked mentally, and they cannot speak now," the doctor told NHK.
A fleet of ambulances, police cars and fire trucks converged on the Tsukui Yamayuri-en centre, a low-rise complex nestled against forested hills, which was cordoned off and draped with yellow "Keep Out" tape.
The killing is believed to be the worst such incident in Japan since 1938, when a man went on a killing spree armed with an axe, sword and rifle, killing 30 people.
- 'Stained with blood' -
Fire department spokesmen told AFP that the dead included nine men and 10 women aged from 18 to 70, and that another 25 people were wounded, 20 of them seriously.
An official from Kanagawa prefecture, which takes in Sagamihara, identified the suspect and said he had turned up at the police station with the murder weapons.
Uematsu "broke a glass window and intruded into the facility at about 2:10 am (1710 GMT Monday) and stabbed those staying there," Shinya Sakuma told a press conference in the prefecture's capital Yokohama.
"When Uematsu turned himself in, he was found carrying kitchen knives and other types of knives stained with blood."
Police said they received a call from the centre around 2:30 am -- about 20 minutes after the assault began -- reporting that a man armed with knives had entered the facility. They said he turned himself in half an hour later.
Local media reported Uematsu had sent a letter to the speaker of the lower house of Japan's parliament in February threatening to kill 470 disabled people.
In the letter, which he hand-delivered to security personnel, he also presented his vision of a society in which the seriously handicapped could be euthanised with the approval of family members.
It brought him to the attention of Tokyo police, who informed Sagamihara authorities that he was a potential threat to others, NHK and other media reported.
Uematsu was hospitalised on February 19, the same day he left his job at the care centre, but was discharged 12 days later when the doctor deemed he would not attack anyone, NHK said.
- 'Unbelievable' -
People in Uematsu's neighbourhood, about a 10-minute walk from the crime scene, expressed disbelief.
He was a "normal, nice boy" who always smiled and offered a greeting, said next-door neighbour Akihiro Hasegawa.
"This is unbelievable," the 73-year old told AFP, adding that Uematsu lived in the house with his parents until they moved out four or five years ago.
Hasegawa also said that he had seen an extensive shoulder-to-chest tatoo on Uematsu and there was a rumour in the neighbourhood he might have been fired from the facility because of it.
"This is a very tragic, shocking incident in which many innocent people became victims," top government spokesman Yoshihide Suga told a press conference.
He added that officials would immediately discuss measures to prevent a similar incident from happening.
Japan has one of the lowest rates of violent crime in the developed world, and attacks involving weapons of any kind are unusual.
Some Japanese couldn't believe the crime had occurred in their country.
"It's crazy," posted a Twitter user. "When I first heard 19 people died, I thought it was somewhere overseas."