A Stevenage teenager is believed to be the first youth to be convicted under the so-called revenge porn law for posting a video of a 14-year-old girl masturbating on social media.

The 17-year-old, who cannot be named because of his age, pleaded guilty at Stevenage Magistrates’ Court this afternoon and will have to wait three weeks before hearing his fate.

Speaking to the magistrates, he said: “I know it was wrong and I apologised to her soon after. Obviously I did mean to upset her. I knew it was wrong, but I was angry at the time.”

Before posting the video on Instagram on April 28, the boy had been in a relationship with the girl for about a year.

They split up in January but the boy, then aged 16, kept contacting her by phone and text to speak to her and demand property back, including a ring, jumper and phone.

The girl was out in Hitchin town centre with her family at around 2pm on April 28 when she heard the boy call her.

She didn’t want to speak to him but agreed to talk to him away from her family to avoid causing a scene.

He became more and more aggressive as the conversation continued and demanded that she gave him a ring, jumper and phone back.

She gave him the ring but said she wouldn’t return the phone until she had her own phone back the next day.

The boy then removed the lid and straw of a milkshake he had with him and gestured it towards the girl and said: “You have got three seconds before I get seriously pissed off.”

When she replied that she would hand over the phone the next day, the boy then poured the contents of the milkshake over her leaving her extremely humiliated and feeling like crying.

He walked away and swore at her, before getting on a bus and banging on the window – making a masturbating gesture to the girl.

At about 9pm the girl received a message from the boy telling her to check her Instagram account.

She was with family at the time and thought it would be something insulting. When she did check her account she found a video of her masturbating which she had sent to the boy while they were in a relationship and was intended only for his personal use.

Her face was not visible in the video but she had been tagged in the post.

Defending, Sohail Bashir said: “The break up of the relationship was acrimonious in nature. There were a number of issues, in particular about the return of property. That was the spark that went on for some time and eventually led to the incident.”

He continued: “The video was removed pretty quickly. I cannot say the exact time but it was around three or four days later. He made frank admissions in interview and has no history of this sort of crime. He offered a great deal of honest remorse in the interview for what he had done.”

The teenage student has one previous conviction in February concerning inappropriate use of a public network to another boy.

He was given a four-month referral order for this crime.

Speaking about the case, the boy’s father said: “I have seen a change in him. We spend more time together to try to keep him out of trouble and away from silly people.”

Adjourning the case for three weeks while a pre-sentence report is prepared, chair of the bench Mrs Maggs said: “If you carry on this path you may have to stop doing specific jobs in specific places.”

The boy will return to the court later this month for sentencing. He has been bailed on the condition he makes no contact with the girl.

It is the second revenge porn case to be heard at Stevenage Magistrates’ Court.

Last month Paige Mitchell, 24, became the first woman to be convicted under the new law for posting explicit photos of a woman on Facebook in May.

Mitchell, of Shephall Way, was given a six-week prison sentence suspended for 18 months.