President Barack Obama's program that has protected 800,000 young undocumented immigrants from deportation is likely to be struck down soon by federal courts, predict the Trump administration and even defenders of the program.

Department of Homeland Security Secretary John Kelly warned the Congressional Hispanic Caucus this week that the program to protect so-called DREAMers is in jeopardy, assuming 10 Republican-led states follow through on threats to mount legal challenges to the program by September.

The Deferred Action for Childhood Arrivals program, or DACA, allowed undocumented immigrants brought to the United States as children to stay and receive work permits, providing they don't commit any disqualifying crimes.

The legal challenges are based on claims that Obama lacked authority to grant "amnesty" to DREAMers.

Stephen Legomsky, a senior counselor at Homeland Security under Obama, said the former president was well within his legal rights when he created DACA. But Legomsky doubted the program will survive because its fate will be decided by a conservative judge in Texas, a conservative appeals court in Louisiana and the conservative-leaning Supreme Court.

"It really hurts me to say this, but the chances of it surviving are very slim," said Legomsky, now a professor emeritus at the Washington University School of Law.

Kelly, who spoke Wednesday to the Hispanic lawmakers, said he is sympathetic to the plight of DREAMers and would like Congress to pass a law permanently protecting them. That is highly unlikely, however, with Republicans in control of both the House and Senate.

Homeland Security spokesman David Lapan said Thursday that attorneys both inside and outside his department have concluded that "if DACA is challenged in court, it would likely fail."

The Justice Department, which would be responsible for defending DACA in court, declined to comment.

Trump pledged during his presidential campaign to terminate DACA, claiming Obama overstepped his authority. After the election, Trump changed course, saying he would treat DREAMers "with great heart" and allowed the program to continue.

Why DREAMers can't just 'rest easy'

DREAMers on edge over Trump on fifth anniversary of protected status

If Trump ends DACA, here's how many students could be affected

First protected DREAMer is deported under Trump

Kelly's assessment of the program's fate alarmed immigration advocates, who already have been concerned about increased arrests and deportations of undocumented immigrants under Trump.

Frank Sharry, executive director of America's Voice, a group that advocates for immigrants, called it a "Code Red moment."

Rep. Luis Gutierrez, D-Ill., who has led congressional efforts to legalize undocumented immigrants, accused Kelly of "playing along with Trump's agenda to deport millions and pretending to not understand his powers to do something about it."

The Republican-led lawsuit against DACA would likely follow the same course as a previous, successful challenge against Obama's immigration policies.

In a 2015 ruling, U.S. District Judge Andrew Hanen, a Texas judge appointed by President George W. Bush, struck down Obama's attempt to expand deportation protections to a broader group of undocumented immigrants, including parents of U.S.-born children. That program, called DAPA, never went into effect.

Hanen's ruling was upheld by the U.S. Court of Appeals for the 5th Circuit in New Orleans later that year. That court, which includes 14 judges appointed by Republican presidents and eight appointed by Democrats, ruled that Obama violated federal immigration laws by unilaterally creating a massive class of undocumented immigrants that could not be deported.

"The (Immigration and Nationality Act) flatly does not permit the reclassification of millions of illegal aliens as lawfully present and thereby make them newly eligible for a host of federal and state benefits, including work authorization," the court wrote in a 2-1 opinion.

The case went to the Supreme Court when it had a vacancy following the death of Justice Antonin Scalia. The result was a 4-4 deadlock that left the 5th Circuit ruling in place, killing the DAPA program.

Texas Attorney General Ken Paxton, a Republican, is leading a drive with other states to challenge DACA on the same grounds. Joining Texas are the attorneys general of Alabama, Arkansas, Idaho, Kansas, Louisiana, Nebraska, South Carolina, Tennessee, West Virginia, and Idaho Gov. C.L. "Butch" Otter.

Jessica Vaughan, director of policy studies at the Center for Immigration Studies, which advocates for lower immigration, said the fate of DACA is already sealed, so Trump should end the program now.

"If my lawyers told me that something I was doing was unconstitutional, I would stop doing it," she said.