A York County Sheriff’s Office sergeant used almonds, YouTube and a little ingenuity to wrangle a wayward horse in the wilds of Cornish on Tuesday morning.

The sheriff’s office received a call around 3 a.m. from a person worried about a horse that was spotted walking down the middle of Ossipee Trail, also known as Route 25, in Cornish. The horse – later determined to be 32 years old – had no identifying markings, halter or bridle.

“The horse produced no identification and would not reveal where he came from or his place of residence,” Sheriff Bill King said in a fittingly tongue-in-cheek statement. “Sgt. Steve Thistlewood responded and utilized his interviewing skills to no avail.”

Thistlewood tried to calm the horse as it became skittish, but still needed to find a way to get it out of the road.

After finding some rope in his cruiser and using a YouTube video as guidance to fashion a halter, the officer-turned-cowboy used almonds to lure the horse close enough to slip on the halter.

Thistlewood called a few people in the area to see if they were missing a horse. A local rancher agreed to hold the horse until its owner could be located.

“Sgt. Thistlewood could not fit the horse in the back seat so he walked about a mile with horse in tow to the hospitable rancher,” King said.

The rancher told King the horse was reunited with its owners later Tuesday morning.