A 16-year-old girl who ran away from her foster home to stay at an unfinished new build was charged by police with abstracting electricity – for plugging her mobile phone into a socket.

The charge, more typically used against cannabis farmers who tap into the mains, was withdrawn when the case got to Swindon Magistrates’ Court on Saturday morning.

Prosecutor Kate Prince told the justices the girl, who is known to police, had been spotted by an officer in Tadpole Garden Village on Friday after she was reported missing from her foster home in another county.

She fled through a garden and over a fence in order to escape the police search party. The girl was found inside an unfinished property brandishing a white curtain pole towards the officers, swearing and telling them to go away.

They detained her and, during a struggle, she kicked a male constable in the groin.

Ms Prince said the officers had found the girl’s clothing in the property together with food and a mobile phone charger plugged into an electricity socket.

By being in Swindon she was in breach of a court bail condition given to her the day before, when she was before Basingstoke Magistrates’ Court, that she live and sleep at her foster home.

Appearing in court via video link from Gablecross police station, the girl pleaded guilty to common assault, breaching her bail, and being found in a dwelling house without reasonable excuse. She also admitted possession of cocaine on a date in January.

The girl was remanded into secure youth accommodation until a hearing on April 28 at Swindon Youth Court.