LOS ANGELES — Gov. Gavin Newsom of California announced Monday that he would withdraw nearly 400 of his state’s National Guard troops from deployment along the border with Mexico and assign them to other duties.

The step to rescind state authorization for the border deployment is a sharp rebuke of President Donald Trump’s continued warnings that migrants entering the country illegally present a national security risk to the United States. It follows a similar move last week by Gov. Michelle Lujan Grisham of New Mexico.

Under a “general order” that Newsom plans to sign, 110 California National Guard troops will be redirected to support the state’s central fire agency, Cal Fire, and another 100 will work on statewide “intelligence operations” aimed at international criminal drug gangs.

Newsom is also seeking to expand the state’s Counterdrug Task Force with 150 National Guard troops, which would require funding from the Department of Defense.

Since his election in November, Newsom has emphasized a progressive vision for California and the country, pitching his state as a leader on issues like immigration, climate change and income inequality. He promised last month to “offer an alternative to the corruption and incompetence in the White House.”

Newsom is expected to speak publicly about the redeployment during his State of the State address Tuesday, with sharp criticism of the president’s immigration policies and rhetoric.

The National Guard has had an expanded presence in California since April, when Newsom’s predecessor, Jerry Brown, agreed to add 400 troops to shore up border-related security at the request of the Trump administration.

At the time, Brown stressed that the deployment, which was financed by the federal government, would support efforts to go after criminal gangs, human traffickers and drug smugglers. He said the troops would not be used to enforce federal immigration policies.

“This will not be a mission to build a new wall,” Brown wrote in a letter to Kirstjen Nielsen, the secretary of homeland security, and Jim Mattis, who was secretary of defense at the time.

“It will not be a mission to round up women and children or detain people escaping violence and seeking a better life,” Brown wrote, adding, “There is no massive wave of migrants pouring into California. Overall immigrant apprehensions on the border last year were as low as they’ve been in nearly 50 years.”

Newsom and Brown are both Democrats. So is Grisham of New Mexico, though the predecessor whose deployment decision she reversed was a Republican.

Before the April deployment, there were about 250 National Guard troops serving in California, and 55 of them were stationed at the border. Under federal law, the troops are paid by the federal government but are under the control of the governor. It was not clear whether federal financing for the troops would continue after Newsom’s redirection order.

Brown’s letter authorizing the deployment was largely seen at the time as a denunciation of Trump’s immigration policies, but many activists and elected officials in the state sharply criticized Brown for agreeing to any Guard deployment at all.

Last summer, Kevin De León, who was then the state Senate leader, urged Brown to “not be complicit” in the administration’s hard-line immigration priorities, which he called “driven by racial animus.” De León, a Democrat, drafted the state law limiting coordination between local authorities and immigration enforcement agents, known colloquially as the “sanctuary state” law, which Brown signed in 2017.

Despite the criticism, Brown later extended state authorization for the National Guard presence at the border through March 2019.

Trump initially thanked Brown for the deployment, which was part of a national deployment of up to 4,000 troops authorized by Mattis. But to the confusion of many Californians, Trump later blasted the governor for placing limits on what the troops could do.

“Looks like Jerry Brown and California are not looking for safety and security along their very porous Border,” Trump wrote on Twitter. “He cannot come to terms for the National Guard to patrol and protect the Border. The high crime rate will only get higher.”

Illegal border crossings have been sharply declining for years. Apprehensions of migrants by border patrol agents are near historic lows. And undetected crossings have fallen to 62,000 in 2016 from 851,000 in 2006, according to the Department of Homeland Security. Several studies indicate that crime rates are lower among immigrants than among native-born Americans.

This article originally appeared in The New York Times.