A man has been given a lifelong ban on contacting a former partner after threatening to "smash her head in and kill her".
Peter Bartleson sent the woman a series of abusive online and text messages during a campaign of harassment
Bartleson has been banned from contacting the woman ever again after a court heard he has now moved out of the area.
"The victim felt compelled to close some online accounts due to the abuse," said Lynne Dalton, prosecuting.
"On April 15 she received two texts telling her Bartleson was going to smash her head in and kill her.
"He turned up at the house in Hartlepool apparently in a rage.
"The victim described how the front door 'exploded' as he burst through it.
"Bartleson grabbed her iPhone and threw it outside, smashing it."
Bartleson, 32, now of Roehampton Rise, Barnsley, South Yorkshire, admitted assault, criminal damage, and using violence to force entry on April 15.
He admitted harassment between February 22 and April 15.
The court heard he has previous convictions for assault, being drunk and disorderly, and for criminal damage.
John Relton, defending, said: "This was conduct Mr Bartleson is not proud of and which he regrets.
"The common assault was no more than him brushing past her, pushing her against a wall.
"He is now in a new relationship with a prison officer in Yorkshire.
"She will lose his job if he goes to prison today.
"Mr Bartleson is in work as a cable puller, often working away in London during the week."
Bartleson was sentenced to a community order of 18 months, a Friday and Saturday night curfew for 26 weeks, and he was ordered to pay £920 in costs and compensation.
The restraining order was ordered to run indefinitely.