ABC News July 8, 2019

Bloodhound, handler rescue 12-year-old girl who had been missing in Wyoming desert for 20 hours: Officials

WATCH: Bloodhound helps rescue 12-year-old girl missing in Wyoming desert

A bloodhound from Colorado was "in the right place at the right time" to help safely rescue a missing 12-year-old girl in the Wyoming desert, authorities said.

The Jefferson County bloodhound, named Jessie, was with her handler, Deputy Kelly Fosler, in another part of Wyoming on an unrelated call when they were asked to help in the search for the missing girl, according to the Jefferson County Sheriff's Office.

Jeffco Sheriff
A bloodhound and handler from Colorado rescued a 12-year-old girl missing in Wyoming.

The girl had left her home the night of July 1. Two investigators from the Natrona County Sheriff's Office were able to track her movements -- up until she left a roadway, Natrona County Sheriff's Office investigator Sean Ellis told ABC News.

(MORE: Barking dog escapes New York home to save family from gas leak, police say)

The community was desperate to participate in the search, Ellis said.

"We had people that were voluntarily searching their barns and their buildings and their acreages," he said.

On Tuesday, July 2, Ellis said he authorized bringing in Jessie and her handler to help.

Jeffco Sheriff
A bloodhound named Jesse rescued a 12-year-old girl missing in Wyoming.
(MORE: Woman who survived 17 days in Hawaii forest: 'It was an opportunity to overcome fear of everything')

Jessie endured nearly 90-degree weather and cactus-ridden terrain, but "knew exactly where she was going," said the sheriff's office.

After nearly two hours, Jessie zeroed in on the missing girl.

The 12-year-old, who had spent about 20 hours in the elements, was hungry and dehydrated but in good condition, according to Ellis and the Jefferson County Sheriff's Office.

Jessie and her handler "were in the right place at the right time," the sheriff's office said in a statement.

Jessie, who is 6 years old, was 10 weeks old when Deputy Fosler started training her, authorities said.

"We’re thankful this young girl is going to be OK, and we’re thankful Deputy Fosler and K9 Jessie were in Wyoming and able to respond to help another agency and this family," the sheriff's office said