A House immigration bill meticulously negotiated by Republicans appeared to be on the brink of failure ahead of a planned Thursday vote after House Speaker Paul D. Ryan (R-Wis.) and a top conservative leader engaged in an unusually heated floor confrontation Wednesday.

Rep. Mark Meadows (R-N.C.) argued with Ryan in plain view of lawmakers, aides and reporters during a Wednesday afternoon vote — a dispute that Meadows later confirmed surrounded the immigration votes scheduled for Thursday. The typically mild-mannered Meadows could be seen repeating “it doesn’t matter” as Ryan spoke to him, and he walked away from Ryan at one point only to return and continue arguing.

Speaking to reporters afterward, Meadows accused Ryan and other House leaders of a bait-and-switch — agreeing to a deal on what would be contained in the compromise legislation only to leave key provisions out of the final text.

“There were things that were supposed to be in the compromise bill that everybody agreed to,” Meadows said. “The talking points do not match the legislative text.”

The 11th-hour blowup added another wrinkle to a tumultuous six-week-long process touched off when a group of moderate Republican rebels filed a “discharge” petition to force votes on immigration legislation. That forced Ryan and GOP leaders to convene negotiations aimed at writing a consensus Republican bill that could pass the House to forestall passage of more liberal bipartisan bills that would pass with mostly Democratic votes.

The negotiations came to a head last week, with a handshake agreement to vote on two bills: a more conservative option that would include hard-line enforcement measures and leave out a guaranteed path to citizenship for the young undocumented immigrants known as “dreamers,” and a second bill written to serve as a compromise between the House GOP’s conservative and moderate wings.

The legislation has now been further complicated by the Trump administration’s decision to separate migrant children from their parents at the southwest border, which has forced leaders to add language addressing the ensuing humanitarian and political crisis.

It’s the compromise bill — which offers dreamers a path to citizenship along with funding for a border wall and other GOP immigration priorities — that sparked Meadows’s complaints Wednesday, though he also lodged separate concerns about which version of the more conservative bill would be voted on Thursday. Meadows would not describe which specific provisions were omitted from the bill.

A spokeswoman for Ryan did not return messages seeking comment on the clash with Meadows. But a Republican aide familiar with the negotiations who spoke on the condition of anonymity to candidly describe the talks disputed that parts of the deal were left out of the bill and noted that Meadows waited two days after negotiations over the bill were closed to raise his objections.

“His team has been part of the process the whole time,” the aide said.

Meadows said Wednesday that he would vote against the compromise bill — something, he said, he wasn’t “necessarily” planning to do: “I’ve invested days and days of my life to try to come up with a compromise that quite frankly is not meted out in the legislative text that reflects those conversations.”

That dispute unfolded Wednesday alongside a whole separate basket of concerns from other House Republicans about the two immigration bills and how they would handle various aspects of the issue — including whether they would resolve the family separations crisis. Trump’s executive order on Wednesday appeared only to delay the need for congressional action, and members remained confused about what legislation Trump wanted them to pass.

Both Attorney General Jeff Sessions and Homeland Security Secretary Kirstjen Nielsen appeared Wednesday before groups of Republican lawmakers on Capitol Hill to make the case for action. But the case was muddied by Trump’s own apparent indecision, which was put on display Tuesday night when he addressed the House GOP in a closed-door meeting where he did not offer a clear endorsement for the compromise bill.

Several lawmakers polled Tuesday night and Wednesday said that they did not feel pressured by Trump to support that bill. One of them, Rep. Roger Williams (R-Tex.), said he was “not there” on the compromise bill and felt he could be a “good conservative” and still vote for only the more conservative option.

“He talked more about [the compromise bill] than the other, but he also said that he would sign whatever he got to his desk,” he said, explaining that the more conservative bill “takes on the issues I’m concerned about.”

Some conservative policy groups have started weighing in against the compromise bill. Heritage Action for America announced on Tuesday that it would score lawmakers on their votes, declaring, “Passing amnesty for millions of illegal immigrants right before a midterm election would be a grave political miscalculation.”

Inside a closed-door morning conference meeting, according to multiple members present, Ryan and other top leaders sought to assure lawmakers that Trump stood foursquare behind the “compromise” bill negotiated between moderate and conservative Republicans after Trump left it unclear Tuesday night that he had any preference as to which bill he preferred they support.

“The message was, even though the president was a little unclear, perhaps, in his chat, that he was very much in favor of the [compromise] bill, and we’ll see what happens,” Rep. Fred Upton (R-Mich.) said.

At one point in the meeting, House Majority Leader Kevin McCarthy (R-Calif.) acknowledged the uncertainty by recounting an exchange he had had with Trump on Tuesday night as they left the Capitol. McCarthy said he mentioned to Trump that lawmakers might not have understood that he supported the compromise bill; Trump, he said, reacted with surprise, saying that he spent most of his remarks praising the compromise.

“He said he was 1,000 percent,” McCarthy said Wednesday, confirming the exchange. “In his mind, he was very clear: He was just talking about the [compromise] bill.”

Later Wednesday, in an address to the Republican Study Committee, Sessions did little to clear up the confusion — or put at ease skittish lawmakers who are concerned that Trump could change his mind, much as he supported an omnibus spending bill in April only to publicly slam it later.

“We support both bills,” Sessions told the group, according to a person present for the closed-door remarks. “That’s my understanding of the president’s position, but I could be wrong.”

By late Wednesday, House leaders said they remained on track to hold votes on the two bills Thursday even though both bills remain well short of the necessary votes to pass, according to three GOP officials familiar with a survey of House Republicans conducted after Trump’s speech.

The compromise bill, in particular, is facing doubts from conservatives who are wary of voting for a more moderate bill that probably cannot pass the Senate intact and that they fear Trump may ultimately abandon.

Meanwhile, the moderate Republicans who have pushed their party leaders over the course of months to bring up immigration legislation are watching the process spin into another false start but held out hope the House would ultimately pass something.

“Obviously we’ve got some more work to do,” Rep. Jeff Denham (R-Calif.), a moderate who led the discharge effort, said Wednesday. “We’ve got other options. We will continue to reserve those options depending on how this plays out. We are not going to let this issue go.”