House Democrats scored a huge legislative victory Wednesday by passing a long-sought gun reform bill — but not without an embarrassing setback.

Just moments before the bill to require universal background checks was approved, Republicans were able to peel off more than two dozen Democrats to push through an amendment promoting the deportation of immigrants without legal status.

The addition — requiring Immigration and Customs Enforcement (ICE) to be notified when such an immigrant tries to buy a gun — marked a stunning victory for GOP leaders that left Speaker Nancy Pelosi Nancy PelosiPelosi: Trump hurrying to fill SCOTUS seat so he can repeal ObamaCare House lawmakers reach deal to avert shutdown Centrist Democrats 'strongly considering' discharge petition on GOP PPP bill MORE (D-Calif.) and her leadership team sniping over who was to blame for their party’s failure to unite in opposition.

ADVERTISEMENT

The Republicans’ surprise amendment will likely have no practical implications, since the GOP-controlled Senate is unlikely to consider the gun reform legislation in any form.

But the Republicans’ success in advancing their immigration enforcement provision — using a procedural move called a “motion to recommit,” or MTR, that almost always fails along party lines — was an embarrassing moment for Democratic leaders less than two months after they seized the lower chamber, leading to visible tensions among the top brass on the floor.

And it wasn’t the first time Republicans have had success with the maneuver. Earlier this month, Democrats voted with Republicans on another MTR to condemn anti-Semitism after freshman Rep. Ilhan Omar Ilhan OmarOmar fires back at Trump over rally remarks: 'This is my country' Trump attacks Omar for criticizing US: 'How did you do where you came from?' Democrats scramble on COVID-19 relief amid division, Trump surprise MORE (D-Minn.) came under fire for suggesting that U.S. lawmakers defending Israel are motivated by money. That motion was adopted as part of a measure to withdraw U.S. support for the Saudi-led military campaign in Yemen.

Wednesday's drama played out as allied gun control activists from Moms Demand Action and the Brady Campaign sat above in the visitors’ galleries to watch the vote on one of their top priorities. The bill requires background checks for all gun sales, including at gun shows and online from unlicensed sellers, with a handful of exemptions for cases like transfers between family members.

Pelosi approached Majority Whip James Clyburn (D-S.C.) with the suggestion that the loss of 26 Democrats on what is typically an easy party-line vote was his responsibility. The confrontation, which took place before a group of members of the Congressional Black Caucus (CBC), angered members of the group, of which Clyburn is a long-standing part.

Democrats made a point of introducing the legislation only a few days into their new majority last month. Wednesday’s vote was supposed to show how far Democrats had come since they commandeered the House floor from the GOP in 2016 with a daylong sit-in to protest inaction after the shooting at a gay nightclub in Orlando, Fla.

ADVERTISEMENT

Instead, Republicans now in the minority found a way to rattle Democrats with House floor mischief of their own.

Rep. David Cicilline David Nicola CicillineClark rolls out endorsements in assistant Speaker race Races heat up for House leadership posts The folly of Cicilline's 'Glass-Steagall for Tech' MORE (D-R.I.), in a floor speech against the GOP’s motion, encouraged lawmakers to endorse his bill that would notify the closest FBI field office as well as state and local law enforcement if a criminal tries to buy a gun.

“If someone buys a gun who's a prohibited purchaser — whatever their immigration status is — that committed a crime, they should be arrested and prosecuted. Every single Democrat believes that,” Cicilline said.

After the votes, House Democratic leaders expressed frustration that they were facing questions about the procedural hitch — and not the underlying background check bill — at what should have been a gleaming moment in their new majority.

When asked if the Republicans’ repeated success with procedural votes empowered the GOP, Pelosi took three full seconds to respond, with clear impatience in her voice: “We won a big victory!”

“I don't know why you're dwelling — what you have to dwell on is a historic victory,” Pelosi told reporters.

The nature of the procedural maneuver that Republicans used means that they could wait to spring the specific legislative text on Democrats moments before a vote, meaning that leaders didn’t know in advance how many of their members would vote for it.

As the number of votes in favor of the GOP’s motion grew, cheers and applause erupted on the Republican side of the chamber. Democrats then huddled in the aisles, staring up at the board showing how everyone had voted.

The Republicans had offered their immigration amendment during the committee markup of the background check bill earlier this month, but it was rejected by the majority Democrats.

House Majority Leader Steny Hoyer Steny Hamilton HoyerOn The Money: Powell, Mnuchin stress limits of emergency loans | House seeks to salvage vote on spending bill | Economists tell lawmakers: Kill the virus to heal the economy House moves toward spending vote after bipartisan talks House Democrats mull delay on spending bill vote MORE (D-Md.) acknowledged that the defecting Democrats in Wednesday’s vote were worried about the political backlash if they didn’t join Republicans to secure the ICE amendment in the final bill.

“You had a number of Democrats vote for the MTR on the theory that they didn't want to be facing a 30-second ad,” Hoyer said.

“They're game-playing to get some of our members on what they think is a bad vote,” Hoyer said of Republicans.

ADVERTISEMENT

A number of Democratic gun reformers emerged from the vote attempting to downplay the divisions — and apparent miscommunication — that led to the surprise passage of the GOP's immigration enforcement provision.

Rep. Ted Deutch Theodore (Ted) Eliot DeutchShakespeare Theatre Company goes virtual for 'Will on the Hill...or Won't They?' Florida Democrat introduces bill to recognize Puerto Rico statehood referendum Matt Gaetz, Roger Stone back far-right activist Laura Loomer in congressional bid MORE (D-Fla.), who represents the district including the Parkland high school where 17 people were killed in a mass shooting last February, said Republicans were simply trying "to divert attention from the historic moment" of passing the background check bill.

Voters won't remember the Republicans' "parliamentary trick," Deutch argued, "but they'll remember that the House of Representatives just passed a very significant piece of gun-safety legislation."

Yet the tensions were palpable on the House floor, both during the vote and after it was tallied.

Even after Pelosi and Hoyer had left the chamber, others lingered to hash out how they'd lost the MTR vote. In one section of the chamber were Clyburn; two members of his whip team, Reps. Dan Kildee Daniel (Dan) Timothy KildeeLawmakers fear voter backlash over failure to reach COVID-19 relief deal Democrats set to hold out for big police reform More than 100 Democrats press Trump to extend jobless benefits MORE (D-Mich.) and Katie Hill Katherine (Katie) Lauren HillObama counsels NBA players on forming a social justice committee Republicans cast Trump as best choice for women House GOP campaign chairman insists party will win back majority MORE (D-Calif.); and several senior staffers. Hill is also one of two leaders of the Democrats’ enormous freshman class.

Eighteen of the 26 Democratic defections on the MTR were freshmen.

ADVERTISEMENT

The lack of unity on the Democratic side infuriated a number of Democrats, who were quick to point out that Republicans never wavered in sinking MTRs offered by the minority Democrats when the GOP controlled the chamber over most of the last decade.

“These are procedural votes, and you don’t give them victories on a procedural vote,” said a Democratic aide. “They’re the minority!”

The aide warned that Wednesday’s MTR vote will only encourage GOP leaders to come back with cleverer — and more carefully drafted — procedural offerings in hopes of jamming the Democrats’ agenda down the road. Those worries are only heightened given that Republicans have now had multiple successes with the gambit.