(Kevork Djansezian/Reuters)

Four U.S. lawmakers are introducing a bill aimed at stopping a spike in digital searches of Americans' cellphones, laptops and other electronic devices at the border.

Promising to end a so-called Bermuda Triangle of hazy federal law, the bill would require border agents to obtain a warrant before searching a U.S. citizen's electronic devices. It would also require that agents not detain or prevent citizens from entering the country if they refuse to provide passwords or passcodes that might enable law enforcement to unlock and view a device's contents.

“Just because you cross the border doesn’t mean the government has a right to everything on your computer,” Rep. Blake Farenthold (R-Tex.), one of the bill's sponsors, said Tuesday. The bill's other sponsors are Rep. Jared Polis (D-Colo.) and Sens. Ron Wyden (D-Ore.) and Rand Paul (R-Ky.).

The Trump administration has been considering more aggressive searches of the digital devices that travelers bring into the United States, which may particularly affect foreigners, according to the Wall Street Journal. Many travelers could be forced to reveal their financial data, give access to their social-media accounts and even show officers their contacts list.

For years, a Supreme Court ruling has granted law enforcement officers greater leeway to search people — including U.S. citizens — at the border. This “border exception” to the Fourth Amendment protection against unreasonable search and seizure is what the new congressional legislation seeks to close.

“Americans’ constitutional rights shouldn’t disappear at the border,” Wyden said Tuesday.

The lawmakers' legislation builds on a 2014 ruling by the Supreme Court that said that in other contexts, such as a normal traffic stop outside the border region, law enforcement officers must obtain a warrant before searching a person's cellphone.

Border searches of cellphones have spiked over the past year. NBC News reports that in the final year of President Barack Obama's tenure, agents searched cellphones at the border some 25,000 times, according to the Department of Homeland Security. New DHS figures show that the Trump administration is on pace to exceed that figure, with 5,000 such searches conducted in February alone, according to NBC.