Two boys have been arrested on suspicion of supplying Class A drugs after the death of a 14-year-old girl.
Two girls, aged 13 and 14, were taken to hospital on Wednesday afternoon after they fell ill at an address in Scarborough, police said.
The 14-year-old later died. The 13-year-old remains in hospital and her condition is not life-threatening.
One of the boys has been released under investigation, while the other remains in custody, officers said.
Emergency services were called to a property in the North Marine Road area of the town, at about 16:00 BST.
Detectives said their investigation was at an early stage.
Det Ch Insp Graeme Wright, of North Yorkshire Police, said: "First and foremost, our thoughts are with the family and friends of the young girl who died as a result of this tragic event, and of all those affected by it."
He appealed for people not to take MDMA or other illegal drugs and for anyone with information about what happened to contact the force.
"This is clearly a devastating incident, and I would ask everyone to respect the privacy of the families involved, and refrain from speculating about this incident online."