A bully who told his pregnant ex-girlfriend “I’m going to kick that baby out of you” has been jailed.

But William Goffett appeared to cry as he heard his former partner describe the stress caused by his threats.

Sending the 25-year-old down for two years, Judge Peter Crabtree said: “Anyone who’s in a domestic relationship deserves to be treated with respect. You were far from treating her with respect – within this period at least.”

Swindon Crown Court yesterday heard Goffett had been in an on-off relationship with his victim for around a year. She was pregnant at the time he was bombarding her with calls in July.

After concerns were raised by social services, the woman had decided to end her relationship with Goffett – choosing the welfare of her older daughter over him.

Prosecutor David Maunder said: “The defendant reacted particularly badly to that outcome.”

On July 2, police were called to the woman’s home in Park South, by a concerned neighbour who could hear sounds of a disturbance.

When the officers arrived defendant was pacing around outside, drunk and shouting to friends they should “get the boys, we’ll shank the feds”; apparently a threat to stab police.

He tried to cycle away but the officers stopped him from leaving. His girlfriend would only confirm that he had grabbed her during the earlier disturbance.

The two policemen arrested him but, as they did so, he lashed out and they fell to the floor. Goffett tried to bite PC Zerebecki, grabbed him by the genitals then tried to bite his leg and sunk his teeth into the man’s arm. He was repeatedly sprayed by the officers with PAVA spray. He kicked the other policeman – PC Westlake - in the neck as he thrashed around, leaving the man seeing stars and later having to go to hospital.

He was released from custody and, over a period of four days around a fortnight later, bombarded his former partner with calls and messages.

In the early hours of July 15, as she stayed with a friend, he left a message on her voicemail warning her he would “smash her window in and do her in”. It later emerged that he had smashed a window in her flat, leaving her fearful he would carry out his other threats.

He would call her in phases, peppering her with calls over two hours then breaking off for an hour. In a rambling call on July 18 he made a number of threats, warning her: “I’m going to kick that baby out of you. They can’t give me a life sentence.” He threatened the woman, her children, her mother and friend, but also claimed to still love his ex and said he just wanted to hear the sound of her voice.

He was arrested on July 18 and taken to custody. He made threats to hurt himself while in his police cell. Detention officers tried to remove a bandage from his hand that he was attempting to use to harm himself. Goffett tried to headbutt an officer and was taken to the floor by three police staff members. He kicked out, his foot connecting with detention officer Richard Kettle, leaving a bruise.

In a victim statement, Goffett’s ex said she had been unable to return to her flat, had taken her daughter out of her old school and no longer liked to shop in Swindon. “I would never want another person to feel the way I do,” she told the court.

Goffett, formerly of no fixed address but appearing via video link from Bullingdon prison, admitted harassment causing fear of violence and three assaults on emergency workers. The court heard he had 55 previous convictions for 84 offences.

Emma Handslip, mitigating, said her client was remorseful and was now finally addressing issues around his mental health and addictions. He had had a difficult upbringing and, with his former partner finally felt loved, but recognised he had “spoilt” things. She urged the judge to give him a chance to work with the probation service. “This is the one chance he’s ever going to have to break this cycle [of offending].”

She told the judge the arrest on July 2 had “not been handled in the best possible way”. Her client had been sprayed with PAVA and kicked by the officers. When his girlfriend tried to intervene she was verbally abused by one of the policemen. It was said the officer was later caught on his body worn camera saying he had lost his temper and “booted” the defendant.

Judge Crabtree acknowledged her comments. Sentencing Goffett, he said: “I acknowledge that the police may have handled your arrested on July 2 in a rather better manner, although of course the police are always faced with difficult circumstances as Ms Handslip readily accepted.”

A restraining order prevents him from contacting his victim, her children and other family members for 10 years, unless through solicitors or by court order.