WASHINGTON – The House overwhelmingly passed legislation on Tuesday (407 to 19) that would overhaul the federal visa waiver program and bar those from Iraq, Syria, Iran and the Sudan, or those who have visited those countries in the last five years, from traveling to the United States without a visa.

Action on the proposal comes in response to the recent attacks in Paris from ISIS operatives, and the shooting in California by a couple that expressed support for the terror group on social media.

“This will help neutralize the threat from foreign terrorists entering our country,” House Speaker Paul Ryan said on Tuesday.

The GOP proposal, which top House Democrats have endorsed, calls for greater sharing of information among the 38 countries that participate in the program with the United States. Currently those eligible can travel for limited time periods without having to apply for a visa. The bill would authorize the Department of Homeland Security to terminate any country’s participation in the program if it doesn’t adequately transmit data. It also looks to beef up efforts to detect fraud from those traveling with electronic passports.

President Barack Obama called on Congress to address the visa waiver program during his prime-time address to the nation on Sunday about his administration’s efforts to combat the threat from ISIS.

Ryan criticized the Oval Office speech, saying, “We heard the President defend staying the course. But why would we stay the course when the enemy is evolving?”

He repeated his call for the President to offer a “real, comprehensive strategy to defeat — defeat, not contain, ISIS.”

The vote was delayed for a short period on the House floor, as Democrats offered procedural motions designed to force a vote on Rep. Peter King’s, R-New York, measure to block gun purchases from those on the terror watch list. Ryan has argued that idea is a “distraction” and that the broader focus should be on measures aimed at fighting terrorism.

The No. 2 House Democrat, Rep. Steny Hoyer of Maryland, said he worked closely with GOP leaders on the visa waiver bill and that the measure said it was “reasonable” and “measured” plan. He contrasted it with the call from Donald Trump, the billionaire businessman who is calling for a ban on all Muslims from entering the U.S.

“The important issue here is no one is excluded by this bill. There are however additional requirements designed to ensure that those who come in this country are in fact not a risk to this country,” Hoyer said.

The Senate may consider the bill as well although Republican leaders have not said when that would occur.