As Brandon Garrett lay stranded in a ravine in Oregon last week, his dog Blue was running through the densely wooded area, toward help. Blue, a whippet, ran for nearly 4 miles with glass in his snout and made it to a campsite where they had been before and where Garrett was supposed to be meeting his friend. The friend, who had been expecting Garrett hours earlier, knew something was wrong, said Garrett’s brother, Tyree Garrett.

Blue’s appearance prompted Brandon Garrett’s family and friends to search for him during the night of June 2 and the next morning, the Baker County Sheriff’s Office said in a statement. He was found by his brother, who spotted Garrett’s truck in the ravine and called the sheriff’s office, which rescued Garrett with the assistance of other authorities. Garrett, 62, had been driving in eastern Oregon, near the state’s border with Idaho, when he reached a curve in the road and went over an embankment, the sheriff’s office said.

After the crash, he crawled 100 yards from his truck and spent the night near a creek in the ravine. Photos provided by the sheriff’s office showed a white pickup truck on its side in a creek, surrounded by bright green trees and bushes. Tyree Garrett said he found the truck in the morning after looking at spots near the creek that could not be seen from the road.

He saw injured dogs lying near the truck and yelled his brother’s name, but he did not get a response. “It stopped my heart,” Tyree Garrett said..