Clarification: The story has been updated to clarify that the York County Coroner's Office has not ruled on the manner of Elias Dowlatram's death. While a man charged in connection with the case told a witness that Elias shot himself, neither the coroner nor police have independently determined who pulled the trigger.

York City Police charged a York man — entrusted with the care of a woman's son — in connection with a boy's death on Tuesday after the boy was fatally shot, according to charging documents.

The coroner identified the 5-year-old boy as Elias Dowlatram, of York. Following an autopsy, Elias' manner of death is pending, while his cause of death is listed as a gun shot wound to the head.

Adrian Michael Moye, 27, of the 800 block of Wallace Street, York, faces charges of possession with intent to deliver drugs, possession of firearm prohibited and endangering the welfare of children - parent/guardian/other commits offense.

MEMORIAL FOR BOY:'My son's flying high,' man cries at vigil for 5-year-old

Moye, who York City Police say was convicted of felony drug charges in 2010, 2013 and 2015, was denied bail by District Judge Jeffrey L. Oberdorf because he is considered a "danger to society," according to online court dockets.

Just after 2 p.m. Tuesday, York City Police were called to the 200 block of East Philadelphia Street for a shooting and once there, they found that a man had taken a child to York Hospital.

Although police cordoned off the area and blood was seen spattered on the porch and sidewalk of a home in the block, it remains unclear precisely where the shooting occurred, as conflicting information is presented in documents.

A woman at the scene, Bert Moye, identified Adrian Moye as her son and the fiance of Elias' mother. Bert Moye said her son called her from the hospital after he had transported the boy and said, "I don't know, Mom, I don't know," when she asked what happened.

In an interview with police, Adrian Moye told them he was the last adult in care of the boy prior to his death, documents state.

Adrian Moye apparently made a different statement to the boy's mother, according to a witness who overheard a conversation between the two.

"During the conversation the defendant (Adrian Moye) admitted to the victim's mother that the victim shot themselves with a firearm," documents state.

In addition, surveillance footage from the area gathered and viewed by police showed that about 2:08 p.m., Adrian parked in front of 258 E. Philadelphia St. and got out, "carrying a lifeless child" and at one point placed the child on the front porch of the home, documents state.

Adrian Moye also brought the child inside the home briefly before placing him inside the SUV and driving away at 2:13 p.m., according to documents.

About 6:17 p.m., York City Police detectives used a search warrant in the 200 block of East Philadelphia Street. Inside, they found a black-and-silver SCC4 9mm handgun. The gun's magazine had 5 bullets and one was in the gun's chamber, documents state.

Detectives also seized several rounds of 9 mm ammunition, and suspected crack and powdered cocaine, which was packaged for sale, documents state.