Unfortunately as more and more people are told they don’t have to follow the law and can ignore its officers we will see more of this totally avoidable situation.
Really you should follow all the orders of the police because if you don't you might get shot. The time to protest is afterward in court with your lawyer, where you can bring the officer up on criminal charges.