AN armed robber who harassed his pregnant former girlfriend has been put on a suspended sentence by a judge.

But Chad Snagg, 31, will remain behind bars because he has been sent back to prison for breaching the conditions of his early release licence.

Snagg repeatedly phoned and texted his ex after she ended their relationship and went to her house and shouted through the letter box.

But after hearing he was applying for parole again in advance of his sentence finally ending in the summer a judge decided to suspend a new jail term.

And he also imposed a restraining order to keep him away from the woman apart from making contact through solicitors to see his child.

Colin Meeke, prosecuting, told Swindon Crown Court: "The relationship had been on and off for several years and they separated at the beginning of May last year.

"It appears he phoned her after she terminated the relationship on scores of occasions. She blocked some numbers, he found another sim card."

Mr Meeke said she told the police he had used about 40 different sim cards to phone and text, though he insists the number was lower.

He said he also went to her house in Royal Wootton Bassett uninvited and called her 'quite revolting names'.

Snagg, of Station Road, Swindon, pleaded not guilty to stalking but admitted the lesser charge of harassment between May and October last year.

The court heard he had a number of previous convictions including two armed robberies, one in Royal Wootton Bassett.

He walked into Tesco Express on Garraways at just before 6.30am on Monday, February 16, 2009.

After threatening staff with what turned out to be a starting pistol he made off with £305 in cash and a number of lottery scratch cards.

He was arrested in Swallows Mead two days later after the Mercedes coupe which had been seen screeching away from the supermarket was spotted.

Sarah Holland, defending, said when her client first contacted his ex after the split it was to find out about her health and that of the unborn child.

"He tells me he knows nothing about the baby, how she is and what plans she has for the child," she said.

Ms Holland told the court Snagg accepted he went too far, though she pointed out he had never threatened her in the course of the harassment.

Snagg is currently a serving prisoner, she said, having received a sentence of six years six months and two days in 2009, which expires on August 27.

But she said he has a parole hearing in three weeks and the authorities prefer long term prisoners to be freed when there is still some licence period.

While he has been in custody she said he had started an Open University course and when he had his liberty he had been working as a gas engineer.

"It is his firm intention to lead, and continue to lead, a law abiding life. He has serious matters on his record, he being released without any form of licence is not attractive," she said.

Passing sentence Judge Tim Mousley QC said: "Your relationship had been on and off for many years, she ended it sometime last year and your reaction to that was to phone her persistently, the precise amount doesn't matter.

"You also called at her home and you were using extreme words to the extreme. Your behaviour was not only persistent but I am satisfied that as you knew her so well you did it in a way that would cause the maximum upset on her, short of physical violence."

He imposed a three-month jail term suspended for 18 months and imposed a seven-year restraining order banning him from contacting her.