A 13-year-old boy who kicked two police officers during an alleged group attack which was filmed and shared on social media has been handed a referral order.

The teenager kicked and shouted at Pcs Andrew Macpherson and Reem Ali in an incident in Frampton Park Road, South Hackney, on June 10, which received “nationwide media coverage”, according to prosecutor Varinder Hayre.

Footage of the incident was posted on social media, which appeared to show an officer pinned down on the ground and being kicked while his female colleague was pushed as she tried to intervene.

Home Secretary Priti Patel and mayor of London Sadiq Khan were among those to publicly condemn the incident.

The youth, who cannot be named for legal reasons, apologised for his actions and said he had “acted impulsively” after witnessing coverage of events in the US regarding the killing of George Floyd.

He was sentenced to a nine-month referral order at Stratford Youth Court on Wednesday after previously pleading guilty to two charges of assault on an emergency worker.

The court heard that the two police officers had been dealing with an incident in which the boy became involved and began filming. He kicked out at Pc Macpherson, who suffered a graze to the elbow and muscle soreness, and also kicked Pc Ali in the back of her knee.

Ms Hayre said the teenager shouted “Black lives matter” during the incident, and told Pc Ali she should be “ashamed” of herself when she began helping her colleague, who was on the ground.

When Pc Ali began to respond to him, the youngster shouted: “Don’t chat to me like that. Do you understand. Don’t ever f****** chat to me like that.”

Stephen McCabe, defending, said the boy had “acted impulsively”, telling the court: “He thought something he had seen with George Floyd was going to happen.”

In a victim statement read to the court on behalf of Pc Macpherson, he said: “They decided to assault police officers without any context or knowledge of what was going on beforehand. It’s sad that society has become skewed in its view of policing.”

The boy was also instructed to pay £307 in costs, including £100 compensation to each police officer.