Updated

BUFFALO, N.Y. -- State police say a man's effort to ditch some drugs from a moving car in western New York didn't exactly go as planned.

Troopers with the state police Thruway detail say 20-year-old Sean Schmidt was standing with his upper body sticking out the sunroof of a vehicle traveling on Interstate 190 in Buffalo late Monday night.

When a trooper following in a state police cruiser activated the car lights to pull the other vehicle over, Schmidt threw a small bag of marijuana, which landed on the hood of the trooper's car.

Troopers say Schmidt was ticketed for marijuana possession and not wearing a seatbelt.