In a shocking upset for House Democrats, Republicans managed Wednesday to amend a bill aimed at strengthening background checks on gun purchase to include language requiring that Immigration and Customs Enforcement (ICE) get notified when an undocumented immigrant attempts to purchase a gun.

Democratic leadership failed to whip enough votes against the procedural hurdle, which passed by a 220-209 margin. Twenty-six Democrats joined Republicans during the floor vote.

ADVERTISEMENT

The ICE move was aimed at putting moderate Democrats in swing districts in a difficult position.

"Hear me clearly — no matter what will be said in just a moment, no matter what the chairman or anyone else would say about this bill, if you vote no, you are voting to allow someone who should not have a firearm to get away with it and not be prosecuted for it," House Judiciary Committee ranking member Doug Collins Douglas (Doug) Allen CollinsTrump, Biden tied in Georgia: poll Loeffler paints herself as 'more conservative than Attila the Hun' in new campaign ad Vulnerable GOP incumbents embrace filling Supreme Court seat this year MORE (R-Ga.) said on the floor ahead of the vote, which was met with cheers from his GOP colleagues.

Judiciary Chairman Jerry Nadler Jerrold (Jerry) Lewis NadlerSchumer: 'Nothing is off the table' if GOP moves forward with Ginsburg replacement Top Democrats call for DOJ watchdog to probe Barr over possible 2020 election influence House passes bill to protect pregnant workers MORE (D-N.Y.) shot back at Collins's remarks, arguing the language was unnecessary since the bill they were voting on requires background checks on all firearm purchases with certain exception including gifts for family members and transfers for hunting, gun ranges or self-defense purposes.

"Now, along comes this motion to recommit which is a total red herring, having nothing to do with the purpose of the bill, and says someone who fails a background check because he's illegally in this country, you should report that to ICE," Nadler said during debate.

"Well, first of all, if he fails a background check because he's illegally in the country, that means the system knows he's illegally in the country. It means they already know that — so what's the point of reporting him?"

The defectors on the measure included Democratic Reps. Cindy Axne Cindy AxneHouse passes bill to avert shutdown House moves toward spending vote after bipartisan talks House Democrats mull delay on spending bill vote MORE (Iowa), Anthony Brindisi (N.Y.), Jim Costa James (Jim) Manuel CostaHouse Democrats call on State Department for information on Uighur prisoner Ekpar Asat Hispanic Caucus requests meeting with private detention center CEOs Black Caucus rallies behind Meeks for Foreign Affairs gavel MORE (Calif.), Angie Craig (Minn.), Charlie Crist Charles (Charlie) Joseph CristFlorida Democrat introduces bill to recognize Puerto Rico statehood referendum Anna Paulina Luna wins Florida GOP primary in bid to unseat Charlie Crist The feds should not spend taxpayer dollars in states that have legalized weed MORE (Fla.), Joe Cunningham Joseph CunninghamWarning signs flash for Lindsey Graham in South Carolina Trump asked Chamber of Commerce to reconsider Democratic endorsements: report GOP leader says he doesn't want Chamber's endorsement: 'They have sold out' MORE (S.C.), Antonio DelgadoAntonio Ramon DelgadoGOP leader says he doesn't want Chamber's endorsement: 'They have sold out' US Chamber of Commerce set to endorse 23 House freshman Democrats Democrats go big on diversity with new House recruits MORE (N.Y.). Abby Finkenauer Abby Lea FinkenauerTrump asked Chamber of Commerce to reconsider Democratic endorsements: report House Democrats' campaign arm reserves .6M in ads in competitive districts GOP leader says he doesn't want Chamber's endorsement: 'They have sold out' MORE (Iowa), Jared Golden (Maine), Josh Gotteimer (N.J.), Kendra Horn Kendra Suzanne HornGOP women's group rolls out six-figure campaign for Ernst Trump asked Chamber of Commerce to reconsider Democratic endorsements: report Officials say NASA facing increased targeting by foreign and domestic hackers MORE (Okla.), Andy Kim (N.J.) Conor Lamb (Pa.), Susie Lee Suzanne (Susie) Kelley LeeMORE (Nev.), Elaine Luria Elaine Goodman LuriaCongress must finish work on popular conservation bill before time runs out Virginians wait up to four hours to cast early voting ballots US Chamber of Commerce set to endorse 23 House freshman Democrats MORE (Va.), Ben McAdams (Utah), Stephanie Murphy Stephanie MurphyDemocrats scramble on COVID-19 relief amid division, Trump surprise Bank lobbying group launches ad backing Collins reelection bid House Democrats call on State Department for information on Uighur prisoner Ekpar Asat MORE (Fla.), Tom O'Halleran (Ariz.), Collin Peterson Collin Clark PetersonThe Hill's Campaign Report: 19 years since 9/11 | Dem rival to Marjorie Taylor Greene drops out | Collin Peterson faces fight of his career | Court delivers blow to ex-felon voting rights in Florida Peterson faces fight of his career in deep-red Minnesota district Democrats for Life urge DNC to change party platform on abortion MORE (Minn.), Max Rose Max RoseLawmakers fear voter backlash over failure to reach COVID-19 relief deal The Hill's Morning Report - Sponsored by The Air Line Pilots Association - Pence lauds Harris as 'experienced debater'; Trump, Biden diverge over debate prep Navy cancels training flight over NYC on 9/11 after criticism MORE (N.Y.), Kurt Schrader Walter (Kurt) Kurt SchraderHouse members race to prepare for first-ever remote votes The 14 Democrats who broke with their party on coronavirus relief vote House votes to condemn Trump Medicaid block grant policy MORE (Ore.), Mikie Sherrill Rebecca (Mikie) Michelle SherrillHillicon Valley: DOJ indicts Chinese, Malaysian hackers accused of targeting over 100 organizations | GOP senators raise concerns over Oracle-TikTok deal | QAnon awareness jumps in new poll House passes legislation to boost election security research Lawmakers call for bipartisan push to support scientific research MORE (N.J.). Elissa Slotkin Elissa SlotkinWray: Racially motivated violent extremism makes up most of FBI's domestic terrorism cases Overnight Defense: House chair announces contempt proceeding against Pompeo | Top general says military has no role in election disputes | Appeal court rejects due process rights for Gitmo detainees Top general: Military will play no role in resolving any electoral dispute MORE (Mich.), Abigail Spanberger Abigail Davis SpanbergerTrump asked Chamber of Commerce to reconsider Democratic endorsements: report Virginians wait up to four hours to cast early voting ballots The Hill's Morning Report - Sponsored by The Air Line Pilots Association - Pence lauds Harris as 'experienced debater'; Trump, Biden diverge over debate prep MORE (Va.), Xochitl Torres Small (N.M.) and Jeff Van Drew Jeff Van DrewThe Hill's Campaign Report: 19 years since 9/11 | Dem rival to Marjorie Taylor Greene drops out | Collin Peterson faces fight of his career | Court delivers blow to ex-felon voting rights in Florida The Hill's 12:30 Report: First Kennedy to lose a Massachusetts election Ex-Democrat Van Drew speaks at GOP convention MORE (N.J.).

The amendment's passage marks the second victory for Republicans during a procedural vote. Earlier this year, they managed to amend a resolution on Yemen to include language condemning anti-Semitism.

The full bill requiring background checks on all gun purchases passed the House 240-190 on Wednesday, with eight Republicans backing the measure and only two Democrats voting against it.

“There's no reason to continue to make it easy for people who are legally prohibited from possessing firearms to acquire them,” Nadler said during debate on the floor ahead of the vote.

“By circumventing the background check process. H.R. 8 would close this dangerous loophole and save many, many lives."