A man who subjected women and children to a 24-year catalogue of violence has been given a lifelong restriction order.
Colin Gillies, 52, repeatedly attacked victims at houses in Aberdeen and Inverbervie, Aberdeenshire.
Lady Carmichael placed Gillies on an Order for Lifelong Restriction and ordered he serve 39 months in prison.
However, the judge told Gillies at the High Court in Edinburgh it was not an indication of when he could be freed.
She said: "That will be for others to determine."
Gillies, formerly of Townhead, Inverbervie, was originally found guilty of a string of offences at Aberdeen Sheriff Court but was sent to the high court because of its greater powers of sentencing.
Lady Carmichael told Gillies he lacked empathy and remorse and had a capacity to deceive.
The judge said: "You have a psychopathic personality disorder."
Lady Carmichael said that expert reports prepared on Gillies showed that the risk he posed to the public if at liberty was high.