A spurned boyfriend who burst into his former partner's bedroom while armed with a knife and a baseball bat and threatened to kill her new lover has dodged prison.

Ross Campbell could have been jailed over the drama at Caira McMartin's Paisley home.

However, 23-year-old Campbell avoided a custodial sentence and was instead ordered to carry out unpaid work in the community.

He was also told to pay Ms McMartin and her new partner, Ben Thelwell, compensation for their traumatic ordeal.

Paisley Sheriff Court heard last month that Campbell burst into the Teviot Avenue flat at around 5am one morning in August last year.

Procurator fiscal depute Keri Marshall told the court that Ms McMartin and Mr Thelwell were in the bedroom when Campbell arrived uninvited.

He banged on the door three times before managing to gain entry to the flat.

Campbell charged straight into the bedroom, waking Ms McMartin in the process.

And, once his former girlfriend realised what was happening, she watched him holding the baseball bat aloft while repeatedly asking "Why did you break up with me?"

Mc McMartin, who had only ended their four-month relationship a few weeks earlier, contacted the police.

A neighbour who had heard a disturbance came to check on her and found Campbell in her bedroom, armed with the knife and baseball bat.

Campbell eventually fled the scene but returned about 90 minutes later and sparked further mayhem as he was spotted holding the knife.

When asked by the concerned neighbour why he was armed, Campbell replied: "I am going to stab him. I am going to kill him."

Campbell, of Saltcoats, Ayrshire, pleaded guilty to possessing offensive weapons and behaving in a threatening and abusive manner by shouting, uttering threats and brandishing a baseball bat.

Sentence had been deferred for background reports.

At the time, defence solicitor Jonathan Manson explained: "His position is she was cheating on him and he had only just found out."

When Campbell returned to the dock this week to learn his fate, Sheriff Robert Fife opted not to send him to jail.

As he placed Campbell on a Community Payback Order, ordering him to carry out 300 hours of unpaid work and be supervised by social workers for a year, Sheriff Fife said: "The discount for pleading guilty at a first diet is not sending you to jail."

Sheriff Fife also ordered Campbell to pay both his victims £500 in compensation and made him the subject of a Restriction of Liberty Order that will see him fitted with an electronic tag.

For the next four months, he is banned from leaving his home between the hours of 7pm and 6am.