WASHINGTON (Reuters) - House Speaker Paul Ryan, the U.S. Congress’ highest-ranking Republican, said on Thursday he could not guarantee passage of compromise legislation meant to address the uncertain status of young “Dreamers” brought to the country illegally as children.

The legislation would allow an estimated 1.8 million Dreamers to apply for six-year, indefinitely renewable “non-immigrant” visas to remain in the United States, and provide $25 billion to beef up security at the U.S.-Mexico border, according to a draft measure seen by Reuters.

Starting in the sixth year, Dreamers who have received the non-immigrant visas could apply for a green card, which would open the pathway to citizenship.

The House of Representatives has been struggling for days to craft a measure that would bridge deep differences on what to do about the threat of deportation hanging over the Dreamers, but efforts by lawmakers so far do not point to a breakthrough.

“We won’t guarantee passage,” Ryan told a morning news briefing where he called the legislation a “very good compromise.”

He added: “We want to give members the ability to express their positions and I do hope this passes.”

Hundreds of thousands of Dreamers, most of them Hispanic, are now protected from deportation because they enrolled in the Obama-era Deferred Action for Childhood Arrivals (DACA) program, which President Donald Trump wants to end. But many Dreamers never applied for the DACA program.

FILE PHOTO: U.S. Speaker of the House Paul Ryan speaks to reporters at an enrollment ceremony for several House bills on Capitol Hill in Washington, U.S., May 24, 2018. REUTERS/Toya Sarno Jordan/File Photo

All 1.8 million Dreamers would be able to apply for the non-immigrant visas, said Representative Mario Diaz-Balart, who was involved in negotiating the legislation.

Congress missed a March 5 deadline set by Trump for replacing DACA, which was established in 2012, with a new law to protect the Dreamers. Lawmakers were unable to bridge differences then.

PARENTS AND CHILDREN

The latest draft measure also says that children apprehended at the U.S. border must not be separated from their parents while in the custody of the Department of Homeland Security, responding to reports of migrant children being torn from their parents at crossings.

The $25 billion included in the measure to beef up border security includes funding for the wall that Trump wants to build to curb illegal immigration and the flow of drugs.

The draft calls as well for ending the “diversity visa lottery,” which lets people from countries with low immigration rates to the United States apply for visas under a lottery system. The measure would additionally reduce family-based migration.

The leader of the hard-right House Freedom Caucus, Representative Mark Meadows, said he knew of at least one error in the draft. “There’s a few things that we’re going to try to modify and make sure we get right,” he told reporters.

But Diaz-Balart, a moderate Republican, said the bill was better than the current situation in which the Dreamers are in “legal limbo.”

“There are parts of it that I really don’t like, but what I like less is having the status quo,” he said.

The draft is one of two immigration proposals expected to be voted on in the House next week.

The other is a conservative Republican measure that would sharply reduce legal immigration, build a wall on the Mexican border and deny Dreamers the chance of citizenship.