The husband of a carer who was stabbed to death by a mental health patient said his wife had been frightened of her killer, a court heard.
Stephen Flatt, a patient at Abacus House, Dunstable, was ordered to be detained at a mental health unit in 2009 for killing Kathleen Bainbridge.
Thomas Bainbridge said Flatt had earlier threatened staff at the site.
Hertfordshire Partnership NHS Trust denies breaking health and safety rules, Luton Crown Court heard.
Mr Bainbridge said his wife told him that Flatt had made a threat to staff that one of them would "get their comeuppance".
He told the court his wife had worked in care homes for 22 years but in July 2007 his wife's moods had changed.
He said: "She was very tense. You knew something was wrong. Something was eating away inside her."
On the day she died, on 24 August 2007, Mr Bainbridge said he had called her mobile at work and when he got no response he called the house direct.
The court heard one of the residents answered, saying: "You need to get here now."
The court was told Flatt had a history of mental problems dating back to the late 1970s.
He had been diagnosed as suffering from paranoid schizophrenia. In the past he had been violent and was convicted of assaulting his father and a policeman.
Later he was diagnosed as suffering from bipolar disorder.
On New Year's Day 2007 Flatt, who was 55, was sectioned under the Mental Health Act and put in a number of units before being put in Abacus House.
The jury had earlier been told that Abacus House was not "geared up" to cope with Flatt.
The owner of Abacus House, Chelvanayagam Menna, 58, of Periwinkle Lane, Dunstable, pleads not guilty to three charges under the Health and Safety Act.
It is alleged that he failed to carry out a proper assessment as to the risks staff and other patients were exposed to by the arrival of Flatt.
As well as pleading not guilty to contravening a health a safety regulation, the trust has denied a second charge of failing to discharge a duty to ensure persons not in its employment were exposed to risks.
The case continues.