A teen who left his friend bloodied in a brawl then later lashed out at an off-duty policeman and urinated in his cell will spend the next four months behind bars.

The 17-year-old, who cannot be named as he is under-18, was given the detention and training order just five days before his 18th birthday.

Swindon Youth Court heard the boy, who has eight previous convictions for violence and offences against the person, struck out at his friend as the two of them scuffled after a party in June last year.

When he realised how badly injured the other youth was, he went to the boy’s aid.

Pictures presented to the magistrates showed the victim sat in hospital with a badly bruised eye and wounds to his face.

His attacker had denied two counts of causing actual bodily harm, but was found guilty in August this year.

Prosecutor Keith Ballinger said the boy also fell to be sentenced for damaging a glass door at the supermarket where he still holds down a weekend job, kicking out at an off-duty policeman on the same night – July 19, 2020 – and damaging a police cell. The last charge was brought after he urinated in his cell at Gablecross police station the day after he was arrested.

The boy admitted two counts of criminal damage and assaulting a police officer.

Leanne Ballato, mitigating, said her client’s mental health had been badly affected by an earlier spell in custody.

However, with the help of a supportive girlfriend he was managing to turn his life around. He continued to work at a supermarket at the weekends, despite his bosses knowing he had broken a glass door.

He was now reconciled with his mum and hoped to complete his school exams and go on to college.

The youngster told chairman of the bench Martin Smith his attack on his friend had been disgusting. “When I saw the picture [of his victim’s wounds] I didn’t like it.”

He said he had apologised to his employers for damaging the glass. He had been drunk and homeless at the time. “Tensions were flying and it was the wrong thing to do,” he admitted.

The magistrates spent more than 30 minutes deliberating on the sentence. Mr Smith said he and his colleague on the youth court bench had given the boy’s sentence a great deal of thought.

Sentencing him to an eight month detention and training order, the bench chairman said: “The attack on your victim was sustained and he was badly injured. You kicked a police officer and you damaged property.

“In addition you have a long record, including for violence and damaging property.”

He will serve half of his sentence in a young offenders' institute before being released to serve the remainder of his sentence on licence.

The boy must pay a £32 victim surcharge, although the magistrates did not order costs or compensation.