WASHINGTON (AP) — House Speaker Paul Ryan painted a rosy scenario Wednesday for a still-evolving Republican immigration deal, saying it gives the GOP an opportunity to enact legislation this year on the contentious issue. But details remained in negotiation between conservatives and moderates, and whatever emerges faces an uphill climb.

Ryan, R-Wis., spoke a day after leaders planned two votes next week on a pair of competing GOP immigration measures.

A conservative bill would offer limited opportunities for young "Dreamer" immigrants to stay in the country legally and include tough border security measures, but it is widely expected to be defeated by a combination of Democrats and moderate Republicans. An alternative that leaders are still crafting would offer those immigrants a potential pathway to citizenship and address President Donald Trump's demands to limit legal immigration, but its fate is uncertain.

Ryan told reporters that the votes would give Republicans "an actual chance at making law and solving this problem."

He acknowledged the political pressure Republicans face to show their positions on the issue, saying the process will allow "the votes that everybody is looking for." He also said the votes would give his party a chance to show "a consensus between our members so we can move forward on the immigration issue."

The bills would represent the GOP's attempt to help 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.

With his planned votes, Ryan effectively blocked unhappy moderates who'd been trying to force votes on several immigration bills. Those included two bills, opposed by GOP leaders, that would have provided a clear pathway to citizenship for the immigrants.

In a seldom-used process, the moderates had gathered 216 signatures on petition that would have forced those votes. But that fell short of the 218 needed — a House majority — to succeed, after leaders pressed some centrist Republicans to not sign.

In the end, the centrists accumulated the names of all 193 Democrats but just 23 Republicans — two short of the 218 total required.

Leaders feared if the moderates' petition worked, it would have embarrassed Republicans by passing a bill that conservatives decried as amnesty for the young immigrants.

With a truce between the GOP's factions, House Republicans were bargaining among themselves to complete the details of the compromise measure.

Late Tuesday, a spokeswoman for Ryan, AshLee Strong, announced the two votes after a bargaining session with the lawmakers from the GOP's conservative and moderate factions ended without agreement on a single package all sides could support.

Rep. Carlos Curbelo, R-Fla., a leader of the moderates' petition drive, credited his group for forcing the issue to the fore.

"Our goal has always been to force the House to debate and consider meaningful immigration reform, and today we're one step closer," Curbelo said.

Conservatives were also pleased, certain that neither bill would necessarily win enough votes to pass, but confident the outcome would show the political strength of their preferred approach.

For weeks, the party's two wings have hunted for ways to provide a compromise that would provide the citizenship pathway and also bolster border security, but have failed to find middle ground.

One Republican familiar with the discussions said the compromise would likely be based on a proposal by moderates that would grant the Dreamers a chance for citizenship but also provide the $25 billion Trump wants for his border wall with Mexico. It would also hew closely to Trump's ideas for ending the diversity visa and impose curbs on legal immigration for some immigrant family members, changes that conservatives want. That Republican spoke on condition of anonymity to describe private talks.

House Minority Leader Nancy Pelosi, D-Calif., criticized the GOP approach.

"If Republicans plan to use Dreamers as a way to advance @realDonaldTrump's xenophobic, anti-immigrant agenda, they will get a fight from House Democrats," Pelosi said in a tweet.

Senate efforts to pass immigration legislation failed earlier this year.
___

Associated Press writer Matthew Daly contributed to this report.