A child stands in front of a Mexican flag during a protest for immigrant rights in Chicago. (Charles Rex Arbogast/AP)

Attorneys general from 19 states and the District of Columbia are urging President Trump to save an Obama-era program that protects nearly 800,000 undocumented immigrants from deportation, and offering to help him defend it in court.

Led by California Attorney General Xavier Becerra, the group of Democrats is twice the size of the 10-state coalition of Republican officials that have threatened to sue the Trump administration if it does not start to phase out the program by Sept. 5.

Obama created the Deferred Action for Childhood Arrivals program, or DACA, in 2012 to allow immigrants who arrive in the United States as minors to legally work and live in the United States. Donald Trump vowed as a Republican candidate to end the program for “Dreamers,” but since the election he has wavered, calling DACA recipients “incredible kids” and saying they should “rest easy” because they are not priorities for deportation.

California Attorney General Xavier Becerra (D). (Rich Pedroncelli/AP)

“You have repeatedly expressed your support for Dreamers,” said the letter to Trump from 20 attorneys general, including Karl A. Racine of the District. The letter was released at midnight Friday. “There is broad consensus that the young people who qualify for DACA should not be prioritized for deportation.”

Under Trump, the government has continued to renew DACA holders’ work permits and issue new ones. But Homeland Security Secretary John F. Kelly told lawmakers last week that the program might not survive a legal challenge.

Becerra and the other attorneys general said in their letter that DACA had transformed the lives of hundreds of thousands of young immigrants, allowing them to earn college degrees, forge careers and boost their spending power.

Rescinding the program, they said, could cost American businesses “billions” in turnover costs.

“The consequences of rescinding DACA would be severe, not just for the hundreds of thousands of young people who rely on the program — and for their employers, schools, universities and families — but for the country’s economy as a whole,” the letter said.

In addition to Becerra, the attorneys general who signed the letter include Racine of the District, Brian E. Frosh of Maryland, Mark R. Herring of Virginia, and the attorneys general from Connecticut, Delaware, Hawaii, Illinois, Iowa, Maine, Massachusetts, Minnesota, New Mexico, New York, North Carolina, Oregon, Pennsylvania, Rhode Island, Vermont and Washington state.