A 47-year-old man has been nabbed in the mysterious case of a dying 13-year-old girl dumped last week at a Massachusetts hospital.

Carlos Rivera, 47, is accused of giving drugs to Chloe Ricard, then bringing her on May 20 to the Lawrence General Hospital emergency room, where she was pronounced dead shortly afterward, MassLive reported.

Rivera was arrested early Saturday on charges of distribution of Class B drugs to a minor, indecent assault and battery on a child under 14, and indecent assault and battery on a person over 14, the Essex County District Attorney’s Office said.

“I want to commend the entire investigative team who worked around the clock to determine the events leading of the tragic death of a 13-year old girl,” District Attorney Jonathan Blodgett said in a statement. “We will continue our diligent pursuit of justice for this victim.”

Investigators said Rivera was accompanied by another girl under the age of 16 when he left Chloe at the ER.

Chloe and the other girl allegedly spent the prior evening and most of the day at Rivera’s apartment in Lawrence before she died.

Chloe’s mother, Deborah Goldsmith-Dolan, said she brought her daughter to a friend’s house the day before, Boston 25 News reported. When her daughter didn’t come home that night, she contacted her friends and was told Chloe was at a pal’s in Haverhill.

But by late Monday afternoon, Goldsmith-Dolan and the girl’s stepfather, Brian Dolan, became concerned and filed a missing persons report. They soon learned that a man in his 40s left their teen’s lifeless body at the hospital, according to Boston 25 News.

“[The police officers] said she was lifeless,” Dolan told the news station. “No pulse, no nothing, they just drove in and dropped her off. She didn’t even have a pulse when they pushed her out of the car.”

The medical examiner has not ruled on cause of death pending autopsy results.

Rivera was ordered held on $750,000 bail and is expected to be arraigned Tuesday in Lawrence District Court.