WASHINGTON (AP) — Republican leaders began the problematic task of finding support for an immigration compromise Wednesday, telling lawmakers that President Donald Trump was backing the still-evolving bill. But cracks within the party were on full display and it seemed that pushing the measure through the House next week would be a challenge.

“If it was a resolution on apple pie, you’re going to lose some votes, some Republican votes,” said Rep. Mario Diaz-Balart, R-Fla.

A day after top Republicans said the House would vote next week on two competing immigration measures, it was widely assumed that a hard-right measure would lose. That bill would give young “Dreamer” immigrants just limited opportunities to remain in the U.S. while imposing tough restrictions on legal immigration and bolstering border security.

GOP leaders, negotiating with quarreling moderates and conservatives, were still writing the second bill. Republicans said it would contain a way for Dreamers to qualify for permanent residence and potentially become citizens, while accepting conservatives’ demands to finance Trump’s proposed border wall with Mexico and restrictions on legal immigration.

With Republicans battling to keep their House majority in November’s elections, merely staging the immigration votes, win or lose, achieves some political objectives. The plan helped party leaders block unhappy moderates trying to force the House to consider immigration bills considered too liberal by many Republicans, and will let lawmakers assert that they tried addressing the issue.

If both bills lose, “at least you know where everyone stands,” said Rep. Warren Davidson, R-Ohio, a member of the hard-right House Freedom Caucus.

Democrats seemed likely to solidly oppose both packages. A day after House Minority Leader Nancy Pelosi, D-Calif., said Democrats would fight any measure advancing Trump’s immigration policies, the leader of the Congressional Hispanic Caucus said her group’s goal was to have “zero Democratic support” for the GOP bills.

Rep. Michelle Lujan Grisham, D-N.M., said the Republican measures “are going to make it clearer than ever that Dreamers are pawns for a wall. That is going to be a very difficult thing to defend” in the November elections, she said.

The bills represent the GOP’s attempt to address Dreamers, young immigrants brought to the U.S. illegally as children. Trump last year terminated the Deferred Action for Childhood Arrivals program, or DACA, which has temporarily shielded hundreds of thousands of them from deportation. Federal courts have kept the program functioning for now.

Even if the compromise measure passed the House, its fate in the Senate was in doubt. Democrats there have enough votes to scuttle any bill.

Trump’s backing — especially if he announced it publicly — could help nail down some support. But GOP “no” votes seemed likely, including by some conservatives dubious about granting what they consider amnesty to people in the U.S. illegally.

In fact, former Trump White House strategist Steve Bannon told a group of House conservatives Wednesday that “if the House votes for amnesty, then it will deflate the base and they’ll stay home,’” said Rep. Steve King, R-Iowa, who invited Bannon. King said Bannon warned that could cost Republicans House control.

Rep. Scott Perry, R-Pa., a Freedom Caucus member, said it was “a pretty big compromise” for him to support the conservative immigration bill because he doesn’t consider it restrictive enough. He said he’d examine details of the middle-ground legislation leaders were crafting before deciding whether to back it and said Trump’s support didn’t sell him.

“I’m glad that the president is finding favor with it, but the president hasn’t seen the legislative text either,” Perry said.

Rep. Mark Meadows, R-N.C., the Freedom Caucus chairman, said the compromise bill “has a potential of garnering enough moderates to perhaps offset some of the conservatives’ defections.”

At a closed-door meeting of House Republicans, Speaker Paul Ryan, R-Wis., said he’d spoken to Trump and “the president seemed very supportive” of the compromise, Rep. Chris Collins, R-N.Y., told reporters. That was echoed by Rep. Brett Guthrie, R-Ky., who said, “I know the president, according to Paul today, supports it.”

White House senior adviser Stephen Miller told the Republican Study Committee, a large group of House conservatives, that the administration supports the conservative and middle-ground immigration measures, Republicans said.

Meanwhile, GOP moderates who’d been trying to force votes on four different immigration measures acknowledged they’d been outmaneuvered by party leaders. The centrists fell two signatures short of 218 — a House majority — needed for a rarely used petition that would have triggered the votes in late June.

Top Republicans said the process could have led to a coalition of Democrats and a few Republicans passing bills helping Dreamers without strong enough enforcement provisions — a political fiasco for the GOP. The moderates ended up with 23 GOP signatures and all 193 Democrats.

“It’s very obvious” that when some lawmakers stated support for the petition, “they were having several conversations with leadership immediately after that,” said Rep. Jeff Denham, R-Calif., a top moderate.

Rep. Carlos Curbelo, R-Fla., another petition leader, said when leaders announced their plans for two votes, some Republicans backing the petition decided to “continue giving these negotiations a chance.”