A new bill introduced Tuesday by a bipartisan group of legislators would require law enforcement agencies obtain a warrant before searching the electronic devices of residents of the United States who are attempting to reenter the country.

The Protecting Data at the Border Act was introduced to the Senate by Democratic Senator Ron Wyden of Oregon and Republican Rand Paul of Kentucky. A version of the bill was also introduced to the House of Representatives by Democratic Representatives Jared Polis of Colorado and Adam Smith of Washington and Republican Blake Farenthold of Texas.

Read: Extreme Vetting Means Facebook Passwords And Bank Records Of Travelers To US May Be Required, Official Says

The bill cites the 2014 Supreme Court case Riley v. California, which found law enforcement required a warrant to search an electronic device belonging to a person upon their arrest. That right would be extended to Americans reentering the United States after traveling overseas under the bill.

It would also require law enforcement make Americans aware of their rights before they agree to hand over their mobile devices and computers or allow agents access their accounts and other digital information.

“Americans’ Constitutional rights shouldn’t disappear at the border,” Wyden said in a statement. “By requiring a warrant to search Americans’ devices and prohibiting unreasonable delay, this bill makes sure that border agents are focused on criminals and terrorists instead of wasting their time thumbing through innocent Americans’ personal photos and other data.”

In a statement of his own, Paul said the 2004 Supreme Court case “still stands today as a shield between the American people and a government all too eager to invade their digital lives,” and argued “Americans should not be asked to surrender their rights or privacy at the border, and our bill will put an end to the government’s intrusive practices.”

Read: Homeland Security Chief Suggests Requiring Social Media Passwords From Visa Applicants

Searches of electronic devices have been on the rise for some time now, as they have become a more prominent part of people’s lives. NBC News reported there has been nearly 25,000 searches of cellphones conducted by law enforcement agents in the last year, including 25 instances of border officers compelling U.S. citizens to give up their passwords to unlock their devices.

These efforts have been ramped up under the administration of President Donald Trump, and may be further bolstered in the future. Secretary of Homeland Security John Kelly told a House committee in February that visitors to the country could be asked to surrender passwords for their social media accounts to be culled by law enforcement.

Reports have also indicated the Trump administration is considering the possibility of requiring people traveling to the U.S. provide cellphone contacts, bank records, social media passwords and other personal information.