A surprise Republican win in the House on a procedural vote Wednesday exposed divisions within the Democratic leadership, set off recriminations and underscored that the party is still adjusting to its new majority.

GOP leaders used one of the few tools available to the House minority to amend a Democratic gun-control bill, adding a provision that would require notification to U.S. Immigration and Customs Enforcement when undocumented immigrants try to buy guns.

Twenty-six Democrats joined Republicans on the vote, an embarrassing setback for party leaders who had carefully screened amendments to keep GOP fingerprints off a high-profile bill.

While the Bipartisan Background Checks Act ultimately passed, finger-pointing began almost immediately in a lengthy floor conference that included the top three Democratic leaders: House Speaker Nancy Pelosi (Calif.), Majority Leader Steny H. Hoyer (Md.) and Majority Whip James E. Clyburn (S.C.).

A bill to expand background checks for gun sales passed the House on Feb. 27, with support from Democrats and opposition from many Republicans. (Reuters)

“It’s a surprise, but it’s not to eclipse a tremendous victory today,” Pelosi said as she left the floor, clearly frustrated that reporters were asking her about the GOP success and not the gun-control breakthrough.

Others were more frank about the breakdown, the second occasion this month where Republicans passed a “motion to recommit” and amend the legislation — something that did not happen once during the previously eight-year GOP majority.

“This is a conversation that we’re going to need to have,” said Rep. Jan Schakowsky (D-Ill.), a senior chief deputy whip. “The more unity we show, the better it is for our new Democratic majority.”

And while the procedural maneuver was mainly a subject of intrigue on Capitol Hill, it did not go unnoticed elsewhere. “How did Nancy Pelosi let this happen?” asked the Twitter account of the Justice Democrats, a group that seeks to elect left-wing lawmakers.

Behind the scenes, according to multiple Democratic aides, tensions have emerged between Pelosi — who views these procedural votes as something Democrats should only rarely support — and Hoyer and Clyburn, who want to give members frequent latitude to join Republicans as long as their votes do not change the final outcome.

“Mr. Hoyer believes members should vote their districts,” said Mariel Saez, a spokeswoman for Hoyer. A Clyburn aide said the congressman would have more to say after a Thursday-morning meeting of the Democratic whip team where Wednesday’s votes are expected to be a central topic of discussion.

The problem with their view, one senior aide argued, is that it only encourages Republicans to offer “gotcha” motions meant to split Democrats — not improve the underlying bills.

“Now the toothpaste is out of the tube, and you can’t get it back in,” said the aide, who was not authorized to comment publicly on internal staff conversations. That aide also described frustrations with a seeming lack of coordination between Hoyer, who is responsible for all floor action, and Clyburn, who is charged with lining up votes.

Multiple aides described crossed signals where too many members — most either freshmen from swing districts or long-tenured moderates — believed they had approval from leadership to cross party lines without imperiling the outcome of the vote. Two deputy whips, Reps. Stephanie Murphy (D-Fla.) and Scott Peters (D-Calif.), have been authorized to manage moderates on these votes — what one aide described as “handing out passes.”

Asked Wednesday whether she had told Hoyer and Clyburn to get their act together, Pelosi said, “I don’t discuss my conversations with the leadership.”

Aides close to Clyburn and Hoyer said, in essence: No harm, no foul — the adoption of the GOP motion didn’t keep the gun bill from passing. It was approved 240 to 190.

“If it was going to impact a vote, we obviously would have worked it, but we ultimately didn’t lose,” one aide said. “It wasn’t going to impact final passage.”

The larger issue for Democratic leaders, however, is that Republicans are already weaponizing the votes against their most vulnerable members.

Hours after Wednesday’s votes, the National Republican Congressional Committee criticized Rep. Sean Casten (D-Ill.) as voting “to keep law enforcement in the dark when illegal immigrants try to unlawfully purchase a gun.” The news release did not describe the vote as procedural.

That has Democratic lawmakers and aides entertaining possible changes to limit the impact of the votes. Those changes are expected to be discussed at Thursday morning’s whip meeting, multiple Democratic aides said.

One option floated by Hoyer, according to three aides, is an advance-notice requirement — under current rules, motions to recommit are typically kept under wraps until they’re offered on the floor. Giving the majority party’s whips more warning, the thinking goes, would give them more time to line up votes.

“If Republicans believe in transparency like they claim they do, providing the same notice as amendments shouldn’t be a big deal,” said a Hoyer aide not authorized to comment publicly. “The fact that they opposed final passage today proves that this is a political stunt.”

Another aide said there could be a broader look at changing the motion from a de facto amendment to one that would actually send the bill back to committee, making it more clearly a procedural, not a substantive, vote.

But any changes could be controversial and open Democrats up to charges of sidelining the opposition: The motion to recommit is widely seen as one of the few tools the House minority has to make an impact on the chamber’s business.

During the last Democratic majority, from 2007 to 2011, roughly 20 percent of motions to recommit were adopted.

The surprise vote Wednesday left Republicans gleeful: House Minority Leader Kevin McCarthy (R-Calif.) delivered high fives on the floor, Minority Whip Steve Scalise (R-La.) offered fist bumps, and rank-and-file GOP members cheered.