A father tried to storm his ex-partner's home before clambering on to the roof in an "extraordinary" five-hour standoff where he demanded cigarettes and McDonald's from police.
Paul Rutledge, 32, flung tiles at officers during the showdown, after he had tried to enter the house of his ex-partner Sarah McPartland.
A court heard Rutledge was under a restraining order stopping him contacting the woman but started banging on her door in Widnes, Cheshire, in the early hours of March 21.
The dad repeatedly shouted her name - and only stopped when she held up her phone to the downstairs' window showing him she was calling the police.
Rutledge then went onto the roof, Liverpool Echo reports, and the lengthy standoff ensued.
Officers were forced to form a human shield to help Ms McPartland and her children, aged between one and 15, out of their house. The children were "fearful" and "crying", the court was told.
Rutledge was today sentenced to 40 months imprisonment, for which he will serve half, after he admitted criminal damage, affray, breaching his restraining order and racially aggravated public order.
Sitting at Liverpool Crown Court, Honour Judge Stuart Driver KC said: "You held your ex-partner and children prisoner in their own house.
"You caused extensive damage to the property of innocent neighbours."
He said the man had a "terrible record and was a high risk of causing severe harm to the public".
A huge emergency response was called to the house, including around 40 police officers, many of them in riot gear in March.
Joanne Moore, prosecuting, said Rutledge threw roof tiles at officers, neighbours' houses and cars.
One neighbour, Gary Riley, got a phone call from police officers telling him to go downstairs as the defendant was claiming to have a knife and was attempting to break holes in the roof.
Ms Moore told the court Rutledge, of Widnes, successfully broke through the roof of elderly neighbour Brian Whitefield and managed to steal a quantity of cash. He then proceeded to shout down to the police officers to go and buy him cigarettes and a McDonald's.
Rutledge laughed at Mr Whitefield and shouted at him "I hope you have insurance". Cheshire Police officers Lee and Teasdale, who attended the scene in response, said the defendant was "shouting and swearing" and threw at least six tiles at the officers. Officer Teasdale was hit by a tile - and, despite wearing full riot gear, suffered a minor injury. Another officer was also racially abused by Rutledge.
The court heard the emergency response was "resource intensive" and included North West Ambulance Service, Cheshire Fire and Rescue Service and Cheshire Constabulary. The local authority also had to deploy a tractor to the area to clear the extensive debris.
Video footage played in court showed the defendant on a roof missing a significant amount of tiles. The court heard multiple victim impact statements including Ms McPartland's. She said her ex-partner's actions were "unforgiveable" - and added: "The long term effect from this is if the children hear a loud noise or bang they ask 'is that daddy on the roof?'"
Ms Moore said Rutledge had 55 previous offences, most recently a stalking offence which resulted in the restraining order. She told the court the compensation in this case was in the "tens of thousands" - but the judge said it would not be realistic in this case.
Mark Shanks, defending, said the defendant had been staying at his mum's house at the time of the offence. He said the pair had a falling out which resulted in Rutledge storming out the house. When he returned his mum was not there, but unbeknown to him she had gone out to buy provisions for her son who was on a crack cocaine bender which meant he had not slept for a number of days.
Mr Shanks said this caused his client to go to his ex-partner's house. He told the court Rutledge now accepts he should have left and cannot give any reason why he went up onto the roof. Rutledge has since shown a considerable amount of remorse, his defence said, both to the victims and the wider public.
Mr Shanks said his client was "disgusted with himself for the trauma caused to his children" - and "hopefully one day they will see daddy as a positive figure". He intends to make contact with them in the future through the proper channels.
The defence finished by acknowledging Rutledge is "not a young man and cannot be behaving in this childish way". Mr Shanks said: "He buried his head in the sand and chose to dig himself in further. The pictures and images speak for themselves." He assured the judge Rutledge wants to get himself back on track and now sees a bright future for himself.