A man who sent “vile and repulsive” messages to his ex-partner before being caught in Bury St Edmunds with a knife has avoided a prison sentence.

Following the breakdown of their relationship in December due to his class A drug use, Oliver Basham, 32, left three abusive voicemail messages on the phone of his former partner around 4am on December 27.

Basham, of Eastgate Street, Bury St Edmunds, then sent further text messages of a similar abusive and threatening nature, Michael Crimp, prosecuting, told the court.

Mr Crimp told Ipswich Crown Court the messages were "offensive and vile" and made reference to the victim's new partner.

Basham then turned up outside the woman's home and shouted further threats about her new partner.

A family friend then was contacted and members of Basham's own family were alerted to the situation.

Just after 2pm on the same day, police received reports of a man carrying an orange-handled pocket knife in his right hand and a bottle of whiskey in the other along Fornham Road.

Police arrived and an officer drew their Taser, ordering Basham to drop the knife.

Basham told police: "I've walked from Eastgate Street with a knife and it took you that long to get here."

A victim impact statement read in court described how the woman now felt vulnerable in her own home and was "on edge" when there was a knock at the door.

Natasha Nair, defending, said: "This incident was, in his own words, his own stupid fault.

"He is utterly disgusted for the way he behaved."

She added that Basham has stopped taking cocaine and reduced his alcohol intake.

Basham previously pleaded guilty to possession of a knife in public and sending messages with intent to cause distress or anxiety at Suffolk Magistrates' Court in January.

Sentencing Basham on Thursday, Judge Emma Peters said: "What a vile and repulsive series of messages and what a frightening situation for the woman.

"That must have been extremely frightening and distressing.

"You criticised the police for taking so long to find you, it's a good thing they did. It must have been worrying for the residents of Bury St Edmunds.

"I've read the pre-sentence report. You were taking an extraordinary amount of cocaine - some £200 worth a day."

Judge Peters sentenced Basham to eight months' imprisonment for possessing the knife and 10 months in prison for sending threatening messages to run consecutively.

The 18-month sentence was suspended for two years by Judge Peters, who also imposed a five-year restraining order.