A 92-year-old hunter was stranded overnight in a heavily wooded area of Virginia before a drone swooped over the scene and found him, authorities said.

The Shenandoah County Sheriff’s Office tried to locate William Luther McDonnell of Winchester, Va., Saturday night, but could not find him in the darkness.

By Sunday morning, the Loudoun County Sheriff’s Office search-and-rescue team arrived. About 20 minutes after it deployed the drone, the man was found — marking the first successful use of the technology since the sheriff’s office started using it in September.

The drone that ultimately located McDonnell is the first in Virginia, and the sixth in the nation, to be equipped with a special antenna for participants in the Project Lifesaver program, designed to find people with medical conditions, such as Alzheimer’s disease, that may cause them to wander from home, a news release said. Program participants wear a wristband that emits a locating signal that the drone’s antenna can pick up.

Though McDonnell was not in the program, the drone located him, said Alex Kowalski, a spokesman for the Loudoun County Sheriff’s Office. The technology, officially called a Small Unmanned Aircraft System and operated by licensed pilots, can carry infrared and high-resolution cameras, the news release said.

“This new technology allows our deputies to more efficiently search for missing people, especially those in the Project Lifesaver program, and bring them home safe. We are pleased we were able to assist Shenandoah County and safely return this man to his family,” Loudoun County Sheriff Mike Chapman said in the release.

About 5:30 p.m. Saturday, a family member called the Shenandoah County Sheriff’s Office to let authorities know that McDonnell had not returned to his car after going deer hunting, said Capt. Wes Dellinger.

“They were expecting him,” Dellinger said. “He had called them and told them he would be a little while getting out, and they went out there to wait for him, and as dark approached they realized he wasn’t out.”

The family was waiting at McDonnell’s car when they called authorities, Dellinger said. Authorities pinpointed McDonnell’s last known location from a call he made to a family member before his phone died, Dellinger said.

Dellinger said that about 20 to 30 people were on the ground and that others were in the command operations center while a helicopter from Fairfax flew overhead and search dogs scoured a 4- to 5-square-mile area based on McDonnell’s last phone call. Darkness hindered visibility, and 16 hours later, he was still missing.

McDonnell said he didn’t get lost. He called it a “misjudgment of terrain” and “misjudgment of time.”

“All of a sudden it got dark on me. I couldn’t see my hands in front of my face. I couldn’t go forwards, I couldn’t go backwards, I couldn’t go left, I couldn’t go right or any place,” he said. “It was worse than the jungle.”

The Loudoun County search-and-rescue team arrived Sunday morning and launched the drone at 9:30. At about 9:50, McDonnell was “visually located,” according to the news release.

“This gentleman was prepared, but his devices and his equipment failed him,” Dellinger said.

Dellinger said McDonnell let his family know where he was going, has known the area for “most of his life,” packed additional food and wore hunting apparel.

The temperatures were in the high 20s and low 30s during the time he was stuck in the woods, Dellinger said.

McDonnell said he stayed warm during the night because he was wearing appropriate clothing. He said he watched a chopper shine its light over him. He took off his baseball cap and waved, to no avail. As soon as it was daylight, McDonnell said, he started to head back.

“I wish they had that drone out there at night. They could’ve found me,” he said. “They didn’t come out until the next morning, and I was on my way back.”

Searches are not uncommon for the Shenandoah County Sheriff’s Office, Dellinger said, given the hiking trails and forest property in the area.

His advice to hikers and hunters: “Plan for the worst, hope for the best.”