A California Highway Patrol helicopter pilot had an unexpected encounter with a drone over the weekend, and was forced to take evasive maneuvers in order to avoid collision.

It seems that a person exhibiting questionable judgement flew his drone right at the police helicopter, which was engaged in a search for a stolen vehicle, requiring the helicopter pilot to swerve to the right in order "to avoid an imminent collision," reports KRON 4.

The helicopter was flying at roughly 800 feet above Highway 4 in Martinez, reports the Chronicle.

“This was a close call,” Officer James Andrews of the CHP air operations unit told the paper. "Absolute worse-case scenario: The drone could come through window and take out the pilot, and the helicopter could come down.”

“If your level of aircraft experience is that you ordered something from Amazon,” continued Andrews, “you ought to stay out of the federal air traffic system.”

After managing to barely avoid a mid-air crash, the helicopter pilot followed the drone until it landed, and then relayed the location to the Martinez police. The Chronicle notes that the Martinez police were able to locate a man with a drone at the spot the helicopter pilot reported, and while they did not arrest him, he could face federal charges.

As to why the man felt it prudent to fly so close to an aircraft? Who knows, maybe he was brushing up his drone-operator skills for an action-packed "droneboning" sequel. Regardless of the reason, police expect this won't be the last time a drone threatens a police aircraft.

"With more people getting drones over the holidays, it is going to get worse,” said Officer Andrews.

Related: Southwest Pilots Spot Five-Foot Drone While Landing At Oakland Airport