Updated

A shivering, scared 5-year-old girl from Mexico spent a terrifying night in dark, mountainous terrain, first with a smuggler and then alone, before authorities found her safe Friday morning.

Candy Gabriela Barranco Gonzalez had crossed into Arizona with her stepfather, but they were separated and she was later abandoned by their smuggler. Candy will be reunited with her mother in Mexico, authorities said.

A Border Patrol ground search team that worked through the night found the girl in a tree-covered area known as "The Orchard" at an elevation of 7,000 feet in Miller Canyon south of Sierra Vista -- about 8 miles north of the Mexican border.

"They heard her crying and managed to locate her," Cochise County sheriff's spokeswoman Carol Capas said.

Candy began her journey with her stepfather and a group of illegal immigrants, said Raul Saavedra, deputy consul with the Mexican consulate in Douglas. But her 25-year-old stepfather was feeling tired and the coyote left him behind.

Candy stayed with the rest of the group as they hiked into Miller Canyon. Border patrol agents found the group and began arresting them. The illegal immigrants scattered into the brush and the girl left with the smuggler, Border Patrol spokesman Jesus "Chuy" Rodriguez said.

He said the stepfather was captured and eventually told authorities the child was with the smuggler.

Saavedra said when the girl's identity was determined, his office called her grandmother in California to see whether the coyote had contacted her family, "but they hadn't heard from him."

Agents searched for but did not find the smuggler. At least two law enforcement helicopters, Cochise County sheriff's deputies and search and rescue teams from Cochise and Pima counties joined in the search.

Border Patrol officials took Candy to a Sierra Vista hospital to make certain she was not injured or suffering from the effects of a night exposed to temperatures in the 20s. She was wearing a coat, hat and snow boots but had no gloves.

Candy will be turned over to Mexican officials and placed temporarily with Mexican child protective services in Agua Prieta, Mexico, until she and her mother can be reunited, authorities said.

"She's really scared, but CPS has a home for kids, so she's going be perfectly fine once she's there," Saavedra said.

The child and her mother are from Naucalpan, a suburb of Mexico City, but the mother was located in Ciudad Juarez and was expected to be brought to the border region by Saturday, Saavedra said.

The girl's stepfather did not have legal custody of the child, Saavedra said.

Children of illegal immigrants frequently are separated from their parents while trying to cross into the United States, Rodriguez said.

"Fortunately, this is a happy-ending case," Saavedra said.