The U.S. Senate on Monday unanimously passed bipartisan legislation to prevent individuals who interfere with U.S. elections from entering the United States.

The Defending Elections against Trolls from Enemy Regimes (DETER) Act makes improper interference in U.S. elections a violation of U.S. immigration law, preventing violators from obtaining a visa to enter the United States.

The bill, which was spearheaded by Sens. Lindsey Graham (R-S.C.) and Dick Durbin (D-Ill.), amends the Immigration and Nationality Act.

“In 2016, Russia committed an act of cyber war against our country.  Unfortunately, Congress has done little to prevent future efforts by Russia or others to influence and disrupt the 2020 elections,” Durbin said in a statement.

“The bipartisan DETER Act would prohibit foreigners who improperly interfere in our elections from coming to the United States to further their schemes, and bar them from entering our country in the future.  Congress has a duty to act and protect one of the main pillars of our democracy – fair and credible elections,” he added.

The bill defines “improper interference in United States elections” as conduct by an alien that (1) violates federal criminal, voting rights or campaign finance law or is under the direction of a foreign government; and (2) interferes with any general or primary federal, state, or local election or caucus, including the campaign of any candidate; or any ballot measure, including an amendment, bond issue, initiative, recall, referral, or referendum.

“As we saw in the 2016 elections, Vladimir Putin’s Russia is attempting to strike at the very heart of the democratic values, freedoms, and liberty all Americans hold dear,” said Graham.

“By barring foreigners who improperly interfere in our elections from coming to the United States, the DETER Act sends a message to hostile nations across the world that the United States will not tolerate foreign interference in our elections.”

The bill responds to threats like those revealed by the Special Counsel’s indictment of Russians who traveled to the United States with the explicit purpose of learning more about American political and electoral processes and how they could interfere with such processes.

The Special Counsel’s indictment described how two of the thirteen individuals gathered intelligence during a three-week trip in June 2014.

According to the indictment, the individuals “falsely claimed they were traveling for personal reasons.”  While in the United States, the individuals traveled to Nevada, California, New Mexico, Colorado, Illinois, Michigan, Louisiana, Texas, and New York “for the purpose of collecting intelligence to inform the [Internet Research Agency’s] operations.”

A third individual attempted to travel to the United States, but did not receive a visa, and an additional co-conspirator, who is not listed in the indictment, traveled to Atlanta in November 2014.

Along with Durbin and Graham, the bill is also cosponsored by U.S. Senators Richard Blumenthal (D-CT) and Chuck Grassley (R-IA).