The 52-year-old defendant named as Ines Andrea R. was convicted of four counts of murder and three counts of attempted murder over the bloodbath at the Thusnelda-von-Saldern-Haus facility in Potsdam, near Berlin, in April.
The regional court required the woman to remain for an unspecified length of time in a secure psychiatric clinic for what chief prosecutor Maria Stiller had called a “profoundly evil” act.
The defendant will also be barred for life from working in care homes.
The court found that Ines Andrea R. had first tried to strangle two residents, believing one of them to be dead and giving up on the other because it was too difficult.
She then pulled an 11-centimetre (four-inch) ceramic knife from her bag and stabbed four other residents to death.
The victims, two women and two men aged between 31 and 56, were found dead in their rooms, with police saying they had been subjected to “intense, extreme violence”.
She was also found to have tried to kill a fifth resident with the knife, a woman aged 43, who survived with serious injuries after emergency surgery.
Ines Andrea R. was detained immediately after the rampage and placed in urgent psychiatric care.
She told the court at the start of her trial in October she had been a lonely child who had been “holed up at home”, had a bad relationship with her mother and “didn’t know how to build friendships”.
“I felt a deep sadness and fear of life, even as a five-year-old,” she said.
The married mother of two sons, one of whom is severely disabled, testified that she had “always wanted to be a nurse”.
Ines Andrea R. had been working a late shift at the time of the killings and attacked when her colleagues were busy with other duties.
After closing arguments last week, the defendant expressed her regret, saying she still could not believe she committed the murders.
“I’m really sorry,” she told the court.
The Thusnelda-von-Saldern-Haus, run by the Lutheran Church’s social welfare service, specialises in helping those with physical and mental disabilities, including blind, deaf and severely autistic patients.
Around 65 people live at the residence, which employs more than 80 people.
Germany has seen a number of high-profile murder cases from care facilities.
In the most prominent trial, nurse Niels Hoegel was sentenced in 2019 to life in prison for murdering 85 patients in his care.
Hoegel, believed to be Germany’s most prolific serial killer, murdered patients with lethal injections between 2000 and 2005 before he was eventually caught in the act.
Last year, a Polish healthcare worker was sentenced to life in prison in Munich for killing at least three people with insulin.