Three-year-old Victoria Bensch wandered away from her family home in Cordes Lakes, Ariz. on Thursday and got lost in the mountains surrounding the valley.
Search parties spent the night looking for the girl as temperatures dipped below 30 degrees.
She was finally spotted 15 hours after she vanished by a helicopter pilot on Friday.
Next to her was Blue, the family's Queensland heeler.
"The dog kept her alert, warm and gave her companionship throughout a very cold night," Dwight D'Evelyn, spokesman for the Yavapai County Sheriff's Office, told The Arizona Republic.
Pilot Matthew Uhl and medic Eric Tarr spotted the girl and her dog in a dry creek bed and landed nearby.
"She wasn't moving when we first came upon her," Uhl told the newspaper. "She was kind of just looking face-down on the ground."
The dog was protective of the child when they first approached, but when the girl smiled, the dog relaxed.
"I think once the dog realized we were there to help them out, he was very excited," Uhl said.
"He ran around while the medic tended to the little girl, and when it was time to go, he jumped right into the helicopter and was ready to go."
She was taken to Phoenix Children's Hospital and treated for frostbite, but doctors said she was healthy despite the ordeal.
"We have to give a lot of credit to Blue," the girl's aunt told the Republic.
"He pretty much stayed with her all night."