As I understand it, in the USA it is the law that if a police office gives one a lawful order it is a crime to not comply with that order. What does the police officer need to do to identify them as a police officer for this law to apply? Is any statement that they are police sufficient, and people are required to believe anyone who says they are police? Is there a specific form of words they must use, perhap similar to the UK arrest requirements? Is it a question of the state of mind of the subject of the order, perhaps similar to the legal standards of preponderance of evidence or beyond reasonable doubt?
The case that made me think of this was the case of a child who was shot by a police office who was in the back seat of the car. In this case it would be impossible for the subject to see the officer, so would have no way of knowing if the speaker was police. I am also reminded of the federal police in portland who drove around in unmarked cars wearing camouflage pattern clothing that makes me think of the proud boys more than police officers. There are also many movies in which the undercover police protagonists will wave a gun and a badge around and expect people to do what they say. In all these cases it would appear to be legitimate doubt as to the identity of the police officer. What are the requirements of a member of the public in such a situation? At which point does it become a crime to not comply with orders given by someone who is not obviously a police officer but claims to be?
The United States is the most prominent country with such a law, and the one I am most interested in. The situation in other countries with similar laws would also be interesting, especially if they contrast with the USA.
This is different from this question as that is about how do I tell if an order given is a legal order. This is different from this question as it is about a requirement for undercover officers to identify themselves, not about the threshold for the requirement for the public to follow orders.