A 47-year-old Massachusetts man was arrested on Saturday, days after he allegedly dropped a teenage girl off at the hospital who later died, police said.

Carlos Rivera faces charges of two counts of distribution of class B drugs to a minor, two counts of indecent assault and battery on a child under 14, and one count of indecent assault and battery on a person over 14, the Lawrence Police Department said in a press release.

He was taken into custody at the police station after speaking with investigators. He's expected to be arraigned on the charges on Tuesday.

Chloe Ricard, of Amesbury, was left at Lawrence General Hospital around 4:50 p.m. on Monday. She died shortly after arriving.

Download the NBC News app for breaking news

Detectives said during their investigation they learned that Rivera was the one who dropped the teenager off. He was accompanied by a girl under the age of 16, whom authorities did not identify.

According to investigators, Ricard and the other teenage girl were at Rivera's apartment Sunday evening and most of Monday. A medical examiner will determine the cause and manner of Ricard's death, police said.

Essex District Attorney Jonathan Blodgett called the girl's death "tragic."

“We will continue our diligent pursuit of justice for this victim," he said in the police department's press release.

Deborah Goldsmith-Dolan told the Boston Globe that she dropped her daughter off at a friend's house in Amesbury on Sunday evening and became worried when she had not heard from the girl by Monday morning.

After texting some of Ricard's friends, Goldsmith-Dolan said she was told that her daughter was safe at another friend's home in Haverhill. Ricard's child services caseworker later told Goldsmith-Dolan that there were "red flags" suggesting the teenager was planning on moving to Virginia.

Goldsmith-Dolan told the outlet that on Monday evening one of Ricard's friends told her that the teen had been taken to the hospital.

Ricard was an eighth-grader who previously attended Amesbury Middle School, the district said in a statement on Tuesday. The Boston Globe reports that she was a student at Solstice Day School in Rowley at the time of her death.

"Chloe was a talented young artist. She was creative and found that she could sometimes best express herself through her artwork," said Jared Fulgoni, superintendent of Amesbury Public Schools. "She was kind to the younger students in the school and she showed great empathy for others. We will miss her smile, her creativity and her huge heart."