A 21-year-old man faces charges after he allegedly stole a New Mexico sheriff's patrol car, later telling investigators he "thought it would be fun."

The San Juan County Sheriff's Office said Matthew Anderson was charged with a fourth-degree felony of unlawful taking of a motor vehicle and misdemeanor resisting or obstructing a police officer.

The incident happened Monday when two deputies were investigating a disturbance at a party and left the cruiser's engine running.

The sheriff's office said a deputy was returning to the vehicle and unlocked it using the keyless entry when Anderson allegedly jumped in and drove off.

The patrol car was found about three hours later. Anderson was later arrested as he walked down a New Mexico highway.