A 5-month-old baby was left partially buried in the mountains of Montana for at least nine hours before being discovered by a Missoula County Sheriff's deputy.

The deputy heard the "faint cry of a baby" during the search and followed the sound, only to find the baby alive, face down, buried under a pile of sticks and debris, a sheriff's office news release said.

The infant was clothed only in a wet and soiled onesie, the release said. In total, the sheriff's office estimates authorities spent more than six hours searching for the baby early Sunday morning.

The baby has minor scrapes and bruises, according to CNN affiliate KPAX-TV, but remains in good condition. The baby was placed in the custody of Montana Child and Family Services.

The child had been in the care of Francis Carlton Crowley, 32, on Saturday, according to the release. That night, deputies received calls reporting a man who was acting strangely in the Lolo Hot Springs area.

As deputies were headed to the scene, additional calls came in saying the man was threatening people and saying he had a gun, the release said, and was reaching in his pockets.

Crowley left the area before deputies arrived, but they learned that the baby who was supposed to be with him hadn't been seen for several hours.

Crowley returned to the hot springs and was apprehended by police, the release states. As deputies tried to question him, the release says it appeared Crowley was under the influence of drugs and was not making sense to officers.

Crowley made statements to officers saying the baby was possibly buried in the mountains.

Crowley has been charged with criminal endangerment, according to the Missoula County jail roster. He is scheduled to appear in court Tuesday, KPAX reports.

It was not clear if Crowley has been assigned an attorney as of Monday, according to the Missoula County Attorney's Office.

Crowley is also a fugitive from Oregon, according to Dylan Arthur, executive director for the parole board in Oregon. Crowley was under post-prison supervision for several counts of burglary and one count of criminal mischief.