The 26-year-old man 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.
They attack began in the early hours of the morning when Uematsu allegedly broke a first-floor window to get into the building. NTV reported that he tied up caregivers before starting to stab the residents.
A doctor at one of the hospitals where victims were taken described some with “deep stab” wounds to the neck.
“The patients are very shocked mentally, and they cannot speak now,” the doctor told national broadcaster NHK.
A fleet of ambulances, police cars and fire trucks converged on the one-storey Tsukui Yamayuri-en centre, a low-rise building nestled against forested hills, which was cordoned off and draped with yellow “Keep Out” tape.
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:10am (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.”
The timeline of the attack remained unclear. Police earlier said they received a call from the centre around 2:30am, raising the alarm that a man armed with a knife had entered the facility. They said he turned himself in half an hour later.
– ‘Blaring noise’ –
“I was shocked,” said Chikara Inabayashi, 68, who lives near the care centre which takes in up to 160 residents.
“I woke up at about 3am because of the blaring noise of the sirens,” he told AFP.
Japan has one of the lowest rates of violent crime in the developed world, and attacks involving weapons of any kind are unusual.
The killing is believed to be the worst such incident since 1938, when a man went on a killing spree armed with an axe, sword and rifle — killing 30 people.
But the country has seen outbursts of random as well as planned violence.
In 2001, eight children at a primary school in Osaka were stabbed to death.
And in 2008 a man ploughed a rental truck into a crowd of shoppers in Tokyo’s bustling Akihabara district before he stabbed passers-by, killing seven people and injuring 10 others.
After that rampage, Japan banned possession of double-edged knives with blades longer than 5.5 centimetres (about two inches).
The nation’s most notorious attack came in 1995, when members of the doomsday cult Aum Shinrikyo released sarin gas in the Tokyo subway system.
Thirteen people were killed and thousands of commuters fell ill in a crime that deeply dented the national sense of security.
But Japan has recently seen an increasing number of cases of attacks on the weak and vulnerable.
In February, a former nursing home worker was arrested for allegedly throwing an 87-year-old resident to his death from a balcony, and reportedly admitted killing two more elderly people in the same way.
Close Japanese ally the United States quickly offered sympathy.
White House National Security Council spokesman Ned Price said in a statement that the attack was “all the more repugnant and senseless” as it had occurred at a facility for the disabled.
© 1994-2016 Agence France-Presse
"We are surrounded by story." ~ Alice McDermott