A Ferrum man will serve 12 months of a five-year prison sentence after pleading guilty in Franklin County Circuit Court to possession of methamphetamine with intent to distribute.

Berkley Lewis Whitlock, 41, will also be on probation for three years after he serves his sentence. He was also ordered to be of good behavior for six years.

As part of a plea agreement, Whitlock reserved the right to appeal Judge W.N. Alexander's decision on the legality of the search of his vehicle that led to the charge.

Whitlock was arrested after officers searched his vehicle with the use of a drug-sniffing dog, according to prosecutor Dwight Rudd.

On March 27, 2013, officers saw the vehicle parked on the side of a gravel road within 100 feet of Ferrum Elementary School, Rudd said. The vehicle was partially blocking the road. When the officers approached the vehicle, it drove off and was later stopped by police.

Whitlock was driving the vehicle, and the officers said he seemed to be impaired, Rudd said. The vehicle was then searched with the use of the canine, and plastic bags containing methamphetamine were found.

Analysis determined that the bags contained 27.82 grams of methamphetamine.