Senate Republicans on Tuesday introduced a measure that would codify the right for Americans to carry guns and ammunition with them while traveling between states.

The bill, S.618, would amend U.S. law to better protect the rights of those undertaking interstate travel with firearms. Sponsors feel the move would help keep law-abiding gun owners from becoming ensnarled in patchwork state and local laws.

“This bill safeguards our Second Amendment rights by strengthening federal protections for responsible gun owners traveling across state lines,” said U.S. Sen. Orrin Hatch, R-Utah, in a statement. “By amending the Firearms Owners’ Protection Act of 1986, this commonsense proposal puts an end to the harassment of upstanding citizens who happen to stay overnight, fuel up, or stop for an emergency during their travels in another state.”

Hatch’s bill, which was introduced with several prominent GOP co-sponsors including Texas Sens. Ted Cruz and John Cornyn, would allow a traveler who is lawfully able to possess a gun, ammo or magazines to transport them anywhere else in the country. The caveat to that is the gun would have to be unloaded or, if in a vehicle, at least not directly accessible to passengers. The measure would bar arrest or detention for travelers stopped by local or state police even if they had violated laws against transporting a firearm in that jurisdiction.

Gun owners often find themselves in a Catch-22 while traveling with their firearms. In one case, a man relocating from Texas to Maine stopped for a nap in a New Jersey parking lot and woke up to an arrest after authorities in the Garden State searched his vehicle and found his gun collection. Another incident saw a man traveling from Florida to New Jersey who was detained in Maryland for nearly an hour even though he had no firearm in the vehicle when police there pinged his driver’s license and found that he had a concealed carry permit.

Hatch’s proposal has the support of gun rights organizations and firearms industry trade groups who feel the move would insulate gun owners from harassment and prosecution when traveling from one state to another.

“This legislation will restore the intent of Congress to protect law-abiding Americans who exercise their fundamental Second Amendment rights when they travel,” said Chris W. Cox, executive director of the National Rifle Association’s Institute for Legislative Action.

Hatch’s bill has been referred to the committee on the Judiciary. Virginia Congressman Morgan Griffith is introducing a companion measure in the U.S. House.