You’ve probably seen old movies where the protagonist is approached by a Nazi or Soviet guard and ordered to “show your papers.” We know that’s a tell-tale sign of a police state. So if police ever ask you to show ID during your travels, it’s natural to feel violated.

In a free society, citizens who are minding their own business are not obligated to “show their papers” to police. In fact, in the United States there’s no law requiring citizens to carry identification of any kind.

So when can police ask for ID?

Carrying an ID is generally required if you’re driving a vehicle or a passenger on a commercial airline. These requirements have been upheld on the slippery premise that individuals who prefer not to carry ID can choose not to drive or fly.

From here, ID laws only get more complicated. In Hiibel v. Sixth Judicial District Court of Nevada, the Supreme Court upheld state laws requiring citizens to reveal their identity when officers have reasonable suspicion to believe criminal activity may be taking place. Commonly known as “stop-and-identify” statutes, these laws permit police to arrest criminal suspects who refuse to identify themselves.

As of 2013, 24 states had stop-and-identify laws. Regardless of your state’s law, keep in mind that police can never compel you to identify yourself without reasonable suspicion to believe you’re involved in illegal activity.

But how can you tell if an officer asking you to identify yourself has reasonable suspicion? Remember, police need reasonable suspicion to detain you. So one way to tell if they have reasonable suspicion is to determine if you’re free to go. You can do this by saying “Excuse me officer. Are you detaining me, or am I free to go?” If the officer says you’re free to go, leave immediately and don’t answer any more questions.

If you’re detained, you’ll have to decide if withholding your identity is worth the possibility of arrest or a prolonged detention. In cases of mistaken identity, revealing who you are might help to resolve the situation quickly. On the other hand, if you’re on parole in California, for example, revealing your identity could lead to a legal search. Knowing your state’s laws can help you make the best choice.

Remember that the officer’s decision to detain you will not always hold up in court. Reasonable suspicion is a vague legal standard, and police often make mistakes. So if you’re searched or arrested following an officer’s ID request, you may contact an attorney to discuss the incident and explore your legal options.