Fencing and high-powered lights mark the U.S.-Mexico border in Southern California. (Mike Nelson/EPA-EFE/Shutterstock)

California Gov. Jerry Brown (D), the only border state governor who had not yet committed troops to President Trump’s National Guard deployment, said Wednesday that he will accept federal funding for 400 personnel — though they would be barred from working on wall construction.

National Guard troops fall under the command of state governors, and in a letter to Defense Secretary Jim Mattis and Homeland Security Secretary Kirstjen Nielsen, Brown said those from California will support operations against drug traffickers, gun runners and smuggling gangs.

“Combating these criminal threats are priorities for all Americans — Republicans and Democrats,” Brown wrote.

“But let’s be crystal clear on the scope of this mission,” his letter continued. “This will not be a mission to build a new wall. It will not be a mission to round up women and children or detain people escaping violence and seeking a better life. And the California National Guard will not be enforcing federal immigration laws.”

In an early morning tweet on Thursday, Trump praised Brown’s decision.

“California Governor Jerry Brown is doing the right thing and sending the National Guard to the Border,” Trump wrote. “Thank you Jerry, good move for the safety of our Country!”

California’s “sanctuary” policies limiting cooperation with U.S. immigration agents have been a target for President Trump’s ire, and in his most recent weekly address he called the state “a border-free zone where thousands of criminal aliens can roam free.”

Trump last week ordered a military mobilization along the border with Mexico, accusing Democrats of encouraging illegal immigration and failing to protect the country from a flood of undocumented migrants. The president said he wants as many as 4,000 troops deployed, saying they will remain there until a border wall is complete.

Neither the White House nor the Pentagon has provided an estimate of how much the military mobilization will cost.

The governors of Texas, New Mexico and Arizona — all Republicans — applauded Trump’s move and quickly began dispatching troops to the border region. Several hundred have arrived so far, and Texas plans to have 1,000 in place within a few weeks.

Members of the California National Guard work next to the U.S.-Mexico border fence in 2006 near the San Ysidro Port of Entry in San Diego. (Denis Poroy/AP)

Brown was the holdout, and his letter pushed back at administration officials’ claims that the United States faces a crisis at the border.

“Here are the facts: there is no massive wave of migrants pouring into California,” Brown wrote. “Overall immigrant apprehensions on the border last year were as low as they’ve been in nearly 50 years (and 85 percent of the apprehensions occurred outside of California).”

Brown was referring to annual arrests by U.S. agents at the southwest border, which dropped to their lowest level last year since 1971.

Trump has taken credit for that decline, but in March the number of arrests and denials of entry at the Mexico border jumped to more than 50,000, the single-highest one-month total since the president took office.

The increase was driven by an 800 percent increase in unaccompanied minors and a 680 percent surge in families crossing illegally, Nielsen told lawmakers Wednesday.

“Glad to have all four border governors working with us and the @USNationalGuard to secure the border,” Nielsen wrote on Twitter after Brown’s announcement. “Partnership w governors is vital to our nation’s success.”

Those groups of migrants typically turn themselves in to U.S. border agents to request asylum protections, citing threats from criminal gangs. The vast majority are from the hyperviolent Northern Triangle of Central America: Guatemala, Honduras and El Salvador.

Those are the groups of migrants, Brown told Mattis and Nielsen, that he does not want Guard troops in California taking into custody.

The Pentagon has said National Guard troops will not perform a law-enforcement role and will be armed only for the purpose of self-defense. As they have in the past, military personnel will fly transport aircraft and surveillance drones, monitor security footage, and clear vegetation, officials have said.

The White House has also asked the military to identify bases and other facilities that could be used to detain migrants. In 2014, the Obama administration set up temporary shelters for children and families at three military bases when they could no longer cope with a rush of asylum seekers.

State government officials in California said Brown’s proposed agreement on the troop deployment had been submitted to the federal government for approval.

Paul Sonne contributed to this report.