A 16-year-old boy has been charged with the attempted murder and rape of a 10-year-old girl in Exmouth, Devon, police have said.

The boy appeared before Exeter youth court on Monday. The alleged attack took place on 4 October in the Marley Road area of the seaside town. He was remanded in detention and will appear before a district judge on Thursday.

During the 10-minute hearing the boy spoke only to confirm he understood the court proceedings.

Devon and Cornwall police have issued a statement warning that people should not identify the boy or the alleged victim on social media.

The alleged victim was found in a distressed state by a member of the public, who took her home. An investigation led by Devon and Cornwall’s major crime investigation team has been launched.

The force said: “Anyone who is alleged to be a victim of a sexual crime is automatically granted anonymity for life, regardless of their age and regardless of the outcome of any subsequent criminal trial.

“Any suspect under the age of 18 is also by law not allowed to be identified. These rules are not solely for media organisations to adhere to, they also apply to members of the public and includes information posted via social media.

“This may be seen as interfering with a live investigation and an active criminal trial, and therefore could see those who do not adhere found in contempt of court. This means that they would find themselves called before a judge and landed with a criminal record.

“We therefore remind the public that it is vital that they do not speculate on the identity of either the victim or the suspect in this case. We will be publishing a further update via our media channels following today’s hearing.”

Speaking after Monday’s hearing, Supt Matt Lawler of Devon and Cornwall police said: “We are able to confirm that the little girl at the centre of all our thoughts has now been discharged from hospital and is being cared for by her family.

“I would also like to recognise the exceptional care she has received from specialist staff at the Royal Devon and Exeter hospital, and the close support provided by our specialist family liaison officers, which will continue in the months ahead.

“The family have asked me to say on their behalf that ‘we would like to thank the community for their help and understanding in the ongoing police investigation. But, we respectfully request privacy while we try to come to terms with what has happened.’”