A Bakersfield man was arrested Monday night in San Luis Obispo after allegedly holding a knife over his head during a fight with several other men.

John Ensor, 41, was fighting with several men near Higuera and Chorro streets at 7:20 p.m. when he pulled out a knife and held it over his head in a threatening manner, according to a news release from the San Luis Obispo Police Department. An off-duty police officer was walking by with his family when he saw Ensor and, sensing a threat to life, drew a gun and identified himself as an off-duty officer. Ensor then reportedly threw the knife on the ground and ran away from the area.

Ensor was caught in a nearby parking lot and identified by the off-duty officer, according to the news release. He was arrested on suspicion of brandishing a weapon. He was booked into County Jail, where bail was set at $2,000.