BROOKS, Maine — A man was arrested on drug charges after a deputy investigated why a car nearly swerved into his police cruiser about 7 p.m. Friday on Route 203.

Apparently the driver of the car had been trying to avoid hitting a cyclist, Brandon G. Moody, 19, of Brooks. Moody, dressed entirely in black, reportedly was riding on the side of the road on a bike with no lights or reflective devices.

The Waldo County Sheriff’s Office deputy stopped him to tell him that he was a hazard, and when Moody identified himself, the deputy ran his name through the police database.

Moody had bail conditions from a prior offense and when the deputy asked him if he had anything he wasn’t allowed to have, Moody allegedly pulled out a bag of Adderall, a drug used to treat narcolepsy and attention deficit hyperactivity disorder.

Moody was arrested and charged with unlawful possession of drugs and violation of conditions of release.

Lt. Jason Trundy of the sheriff’s office said Moody was cooperative with authorities.