When you’re entering the United States, whether at an airport or a border crossing, federal agents have broad authority to search citizens and visitors alike.

And that can include flipping through your phone, computer, and any other electronic devices you have with you.

As US Customs and Border Protection outlines in a tearsheet it provides to people at the border, federal agents can seize and search your phone, and even make a copy of it to have forensic experts analyze its contents off-site.

How can they do that?

The Supreme Court decided in 1976 and 2004 that people have fewer claims to their Fourth Amendment privacy rights granted by the Constitution when entering the country, because the government has to protect its borders.