SACRAMENTO — California Attorney General Xavier Becerra said Tuesday that California will sue the federal government to protect the thousands of immigrants temporarily shielded from deportation under a program the Trump administration said it is rescinding.

Withdrawing the program after immigrants disclosed their undocumented status on condition of having that protection could violate their due-process rights, Becerra said.

Calling the move unconstitutional, Becerra joined lawmakers in saying they will explore all options for protecting immigrants who were brought to the country as children and applied for the Deferred Action for Childhood Arrivals program.

The 2012 program implemented by then-President Barack Obama allows immigrants who came to the U.S. before age 16 to remain here and receive a work permit for two years if they have lived in this country continuously since 2007 and were in school or have graduated from high school. Of the 800,000 participating immigrants, more than 200,000 live in California.

U.S. Attorney General Jeff Sessions announced Tuesday that the Trump administration will no longer accept new DACA applications. He said people currently in the program can continue in it until March 5, 2020, if they apply for the required renewals.

Becerra said immigrants stepped out of the shadows to take part in the federal program, paid hundreds of dollars in processing fees, and relied “on the representation of the federal government.” He said California will look to partner with other states whose leaders have urged President Trump not to end DACA.

“We will take a look at every aspect of what the president is now ordering, and we will make a decision on how to defend these individuals because they stepped forward,” Becerra said. “No one should be treated this way by their federal government.”

Senate President Pro Tem Kevin de León, D-Los Angeles, said a team of lawyers is reviewing the state’s current protections for immigrants and is determining whether additional legislation is needed. The state Legislature would have to act quickly, however, since the legislative session ends Sept. 15.

The Legislature is already considering several high-profile bills to extend protections to immigrants living in the country without documentation.

SB54, by de León, would prohibit law-enforcement officers from carrying out federal immigration laws, such as helping Immigration and Customs Enforcement agents with arresting, detaining or investigating a person for entering the country illegally. Such protections would not be extended to people living in the country illegally who have been convicted of serious or violent crimes, but law-enforcement groups say that exemption still leaves out many offenses. The bill passed the Senate and is facing a tough vote in the Assembly.

The state also set aside $45 million this year to help immigrants in the state fight deportations.

“Donald Trump wants to push those bright young minds back into the shadows, and in doing so he endangers California’s economy,” de León said.

Dozens of lawmakers crammed into a news conference to lend their support, with many of them noting that they themselves are children of immigrants.

One of them was Assemblywoman Lorena Gonzalez Fletcher, D-San Diego.

“By the grace of God I was born on this side of the border,” she said.

Gonzalez said the Trump administration’s announcement immediately sent fear into immigrant communities, leaving young DACA participants, often called “Dreamers,” unsure what to do. Gonzalez urged them to go to school or work just as they’ve been doing, and said it’s important to know that the order doesn’t immediately change anything for them.

“California will continue to fight, whether it’s through litigation or whether it’s through legislation or whether it’s through activism and advocacy,” said Secretary of State Alex Padilla.

Sen. Ben Hueso, D-San Diego, chair of the California Latino Legislative Caucus, addressed his message to the “Dreamers out there.”

“We are standing beside you,” he said. “If there is something you need, call our offices for support. Call our offices to get information so you know what rights you are entitled to in our state and our country.”