A judge who specialises in analysing issues relating to vulnerable people says assaults and serious incidents will occur at care homes and psychiatric units which house mentally-ill residents.
District Judge Anselm Eldergill - who sits in the Court of Protection - said that "sad fact" was an important factor to consider when deciding whether it was in someone's best interests to be at home or in a "shared environment".
His comments came as he ruled that an elderly dementia sufferer at the centre of a Court of Protection case should stay at a care home where he had been assaulted by another resident with dementia.
The judge said the man had suffered bruising after being hit with a walking stick on three occasions over three days.
"I can say without qualification that it is a sad fact that assaults and other serious incidents do sometimes occur at well-run care homes, nursing homes and psychiatric units because of the mental health of someone receiving care or treatment there," said Judge Eldergill, in a ruling after a hearing in London.
"That is one important factor to consider when deciding whether it is in someone's best interests to be at home or in a shared environment."
Judge Eldergill said investigations had been carried out after the assaults. The conclusion had been that the assaults were isolated incidents. Evidence showed that the man was content at the care home and a transfer might agitate him. The judge said the resident who carried out the assaults was no longer at the care home.
None of the people involved were identified in a written ruling.
But the judge said the local authority involved - Essex County Council - could be identified.
The case hit the headlines in the summer of 2013 when Judge Eldergill ruled that the council could sell a painting the man owned to help pay for his care.
Judge Eldergill said council officials could auction Stratford-upon-Avon Sunset - a 1906 work by Lucien Pissarro.
The painting later sold for £24,000.
Judge Eldergill said the council could also sell a house owned by the man plus other possessions.
The Court of Protection is part of the High Court and analyses issues involving vulnerable and sick people.
Hearings usually take place in private.
Judge Eldergill has given permission for reporters to attend hearings and cover the case.