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.

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.

Pro-immigration activist Omar Martinez attends a rally in front of the U.S. Supreme Court on April 18, 2016, in Washington. The Supreme is scheduled to hear oral arguments in the case of United States v. Texas, which is challenging President Barack Obama's 2014 executive actions on immigration -- the Deferred Action for Children Arrivals (DACA) and Deferred Action for Parents of American and Lawful Permanent Residents (DAPA) programs.
Alex Wong, Getty Images

Texas Attorney General Kenneth Paxton speaks to members of the media as Texas Solicitor General Scott Keller, right, listens in front of the U.S. Supreme Court on April 18, 2016. The Supreme Court heard oral arguments in the case of United States v. Texas, which is challenging President Obama's 2014 executive actions on immigration -- the Deferred Action for Children Arrivals (DACA) and Deferred Action for Parents of American and Lawful Permanent Residents (DAPA) programs.
Alex Wong, Getty Images

A legal immigrant reads a guide of the conditions needed to apply for the "DREAMers" program, formally known as Deferred Action for Childhood Arrivals (DACA) at the Coalition for Humane Immigrant Rights, CHIRLA offices in Los Angeles in this 2012 file photo. Hundreds of thousands of young illegal immigrants scrambled to get papers in order, as the U.S. started accepting applications to allow them to avoid deportation and get a work permit, but not a path to citizenship.
Damian Dovarganes, AP

Maya Lopez, one of the event's organizers, claps as DACA recipient Leo Reyes speaks about his experience as an immigrant at a rally in front of the Capitol on Feb. 19, 2017, in Salem, Ore. DACA, the Deferred Action for Childhood Arrivals program, provides limited immigration benefits but no direct path to lawful permanent residence or citizenship.
Molly J. Smith, Statesman Journal

Undocumented immigrant Isabel Sandoval and her daughter Marisol react after the U.S. Supreme Court issued a split ruling on President Obama's immigration policy during a vigil in Los Angeles on June 23, 2016. The ruling presents a challenge to President Barack Obama's Deferred Action for Parents of Americans and Lawful Permanent Residents (DAPA) and Deferred Action for Childhood Arrivals (DACA) programs.
Eugene Garcia, european pressphoto agency

Rosario Reyes, left, 36, and her son Victor Reyes, 7, chant "Si se puede!" during a prayer for justice vigil and rally in front of the Supreme Court in this 2015 file photo. Organized by The Fair Immigration Reform Movement (FIRM) and CASA, about 40 people gathered to pray for the Supreme Court justices after they agreed to hear a case regarding President Barack Obama's executive order to expand Deferred Action for Childhood Arrivals and implement Deferred Action for Parental Accountability.
Chip Somodevilla, Getty Images

Jessica Colotl, whose parents brought her to the country illegally as a child and a student at Kennesaw State University, talks during a media interview at her lawyer's office in Atlanta on April 28, 2011. Federal authorities revoked the protection from deportation May 3, 2017, granted to Colotl, who became a cause celebre in the debate over illegal immigration when she was a student. Her status was became known following her arrest for driving without a license.
John Amis, AP

Legal observers from the National Lawyers Guild speak to Department of Homeland Security (DHS) officers outside U.S. District Court during a hearing for Daniel Ramirez Medina, a DACA recipient who was detained by U.S. Immigration and Customs Enforcement (ICE) in Seattle on Feb. 17, 2017.
Lawyers for Ramirez Medina said his arrest -- for the purpose of expulsion -- was a first among people included in the so-called DACA program protecting unauthorized immigrants who were brought to the United States as children.
Jason Redmond, AFP/Getty Images

This undated file photo provided by the law firm Public Counsel shows Daniel Ramirez Medina, 23, who was was brought to the U.S. illegally as a child but was protected from deportation by President Barack Obama's administration.
Daniel Ramirez Medina, AP

A rally is held outside the U.S. District Court for the Western District of Washington at Seattle where the hearing is being held for Daniel Ramirez Medina v. U.S. Department of Homeland Security on Feb. 17, 2017. Medina, who was protected by the DACA program, was arrested by Immigration and Customs Enforcement (ICE).
Karen Ducey, Getty Images

Brandon Vasquez, living in the United States legally under the immigration policy known as Deferred Action for Childhood Arrivals, speaks during a news conference that turned into a protest over recent Immigration and Customs Enforcement raids in the U.S., Feb. 15, 2017, in Las Cruces, N.M. The Homeland Security Department said Monday that 680 people were arrested in roundups last week targeting immigrants living illegally in the United States. The figure is far below the totals of similar raids conducted under the Obama administration.
Josh Bachman, AP