The following FAQ is from the ACLU on what to do when encountering law enforcement at airports and other ports of entry into the U.S.:
This page tells you about your basic rights. It is not a substitute for legal advice. You should contact an attorney if you have been arrested or believe that your rights have been violated.
REMEMBER: It is illegal for law enforcement officers to perform any stops, searches, detentions, or removals based solely on your religion, race, national origin, gender, ethnicity, or political beliefs. However, law enforcement officers at the airport and at the border generally have the authority to search all bags and to ask you questions about your citizenship and travel itinerary.
Q. What types of law enforcement officers could I encounter at the airport and at the border?
A. You may encounter any of the full range of law enforcement officers listed above in Section I. In particular, at airports and at the border, you are likely to encounter Customers and Border Protection officers (CBP) and Transportation and Safety Administration (TSA) officers.
Q. If I am entering the U.S. with valid travel papers, can law enforcement officers stop and search me?
A. Generally, customs officers may stop, detain, and search any person or item at the border, including laptops or cell phones. This is true even if there is nothing suspicious about you or your luggage. Officers, however, may not select you for a personal search or secondary inspection based on your religion, race, national origin, gender, ethnicity, or political beliefs.
Q. Can law enforcement officers ask questions about my immigration status?
A. Customs officers have the authority to ask your immigration status when you are entering or returning to the United States or leaving the country. They have the power to determine whether non-U.S. citizens and lawful permanent residents have the right to enter the country. If you are a U.S. citizen and you have presented a valid passport, you do not have to answer officers’ questions, although refusing to answer routine questions about the nature and purpose of your travel could result in delay and/or further inspection. If you are a lawful permanent resident, we recommend you answer officers’ questions. If you are a non-citizen visa holder, you may be denied entry into the United States if you refuse to answer officers’ questions. Officers, however, may not select you for questioning based on your religion, race, national origin, gender, ethnicity, or political beliefs. If you are told you cannot enter the country and you fear you might be persecuted or tortured if you are sent back to the country from which you traveled, you may tell the customs officer about your fear and ask for asylum.
Q. Do I have to provide my fingerprints?
A. All visitors and lawful permanent residents are fingerprinted on entry into the United States from abroad.
Q. If I am selected for a longer interview when I am coming into the United States, what can I do?
A. If you are a U.S. citizen and the officers’ questions become intrusive, you have the right to talk to a lawyer before answering any questions. You should be aware that refusing to cooperate with officers may result in delay and/or further inspection. If you are a lawful permanent resident, your right to talk to a lawyer depends on the circumstances. If the officers’ questions become intrusive, you may ask to speak to a lawyer but, in some situations, officers have the authority to refuse to allow you to speak to a lawyer before you answer their questions. If you are a non-citizen visa holder selected for further questioning, you may ask to talk to a lawyer but you generally do not have the right to consult a lawyer before answering the officers’ questions. Importantly, for anyone attempting to enter the United States, if a customs officer or border agent informs you that you are under arrest, or if it becomes clear that he or she suspects you have committed a crime, you have the right to talk to a lawyer before answering any questions.
Q. Do I have to provide my laptop passwords or unlock my mobile phone for law enforcement officers? Can law enforcement officers search my electronic devices or make copies of the files?
A. Officers have sometimes asked travelers to provide their laptop passwords or unlock their mobile phones. Whether you have a right to decline to provide this information is a contested legal issue. The extent to which officers have the authority to search or copy files in your electronic devices without any reasonable suspicion that the devices contain evidence of wrongdoing is also a contested issue. U.S. citizens cannot be denied entry to the United States for refusing to provide passwords or unlock devices, but refusal to do so might lead to delay, lengthy questioning, and/or officers seizing your device for further inspection. For lawful permanent residents and non-citizen visa holders, refusing to cooperate might also lead to officers denying your entry into the country. If an officer searches and/or confiscates your laptop or cell phone, write down his or her name and get a receipt for your property.
Q. Can my bags or I be searched after going through metal detectors with no problem or after security sees that my bags do not contain a weapon?
A. Yes. Even if the initial screen of your bags reveals nothing suspicious, the screeners have the authority to conduct a further search of you or your bags. Screeners may not, however, select you for a personal search or secondary inspection based on your religion, race, national origin, gender, ethnicity, or political beliefs.
Q. What if I wear a religious head covering and I am selected by airport security officials for additional screening?
A. You have the right to wear your religious head covering. You should assert your right to wear your religious head covering if asked to remove it before going through airport security screening. If an alarm goes off, however, airport security officers may request additional screening. They may then conduct a pat-down of your religious head covering or ask you to remove it. You have the right to request that the pat-down or removal be conducted by a person of your gender and that it occurs in a private area. If you do not want the TSA officer to touch your religious head covering, you must refuse and say that you would prefer to pat down your own religious head covering. You will then be taken aside and a TSA officer will supervise you as you pat down your religious head covering. After the pat-down, the TSA officer may rub your hands with a small cotton cloth and place it in a machine to test for chemical residue. If you pass this chemical residue test, you should be allowed to proceed to your flight. If the TSA officer insists on the removal of your religious head covering, you have a right to ask that it be done in a private area. Officers may not conduct additional screening based solely on your race, national origin, religion, gender, ethnicity, or political beliefs.
Q. What if I am selected for a strip search?
A. A strip search at the border is not a routine search. It must be supported by “reasonable suspicion,” and must be done in a private area.
Q. What if I am traveling with children?
A. You may opt your children out of an airport scan. However, there is no exemption for children from the pat-down search. Children under 13 years old may leave their shoes, light jackets, and headwear on during screening.
Q. What if I am traveling with breast milk or formula?
A. Mothers flying with and without children are permitted to bring breast milk and formula (and ice packs or other accessories required to cool the breast milk or formula) in quantities greater than three ounces, as long as you notify the officers about the items at the security checkpoint. When carrying breast milk or formula through the checkpoint, they will be inspected. TSA officials may test the liquids for explosives. TSA officials may ask you to open the containers during the screening process. Breast milk and formula, along with other liquids and gels, may also be packed in your luggage and checked with your airline.
Q. If I am on an airplane, can an airline employee interrogate me or ask me to get off the plane?
A. An airline pilot may refuse to fly a passenger if he or she reasonably believes, based on observation, that the passenger is a threat to flight safety. A pilot may not, however, question you or refuse to allow you on a flight because of biased stereotypes, including any based on your religion, race, national origin, gender, ethnicity, or political beliefs.
Q. What do I do if I am questioned by law enforcement officers every time I travel by air and I believe I am on a “no-fly” or other “national security” list?
A. If you believe you are mistakenly on a list, you should contact the TSA and file an inquiry using the Traveler Redress Inquiry Process. More information is available here. If you think there may be some legitimate reason for why you have been placed on a list, you should seek the advice of an attorney.