President Trump toured border wall prototypes in San Diego last month. (Evan Vucci/AP)

President Trump has threatened to upend a tentative agreement between the state of California and federal officials to mobilize National Guard personnel and send them to the Mexican border, declaring via tweet Thursday that his administration will not pay for the deployment.

Gov. Jerry Brown (D) announced Wednesday evening that his state had reached a deal with the Pentagon and Department of Homeland Security to join the president’s plan for a military reinforcement of the U.S. Border Patrol on the condition that California troops would abstain from immigration-enforcement duties. Brown said he would send up to 400 personnel to focus on fighting drug trafficking and gangs.

Brown’s announcement appeared to settle several days of back-and-forth posturing between Trump and the man he mocks as “Governor Moonbeam,” but the president’s latest tweet indicated he was unwilling to let the dispute go. Trump praised Brown last week when the governor initially agreed to send troops.

“Governor Jerry Brown announced he will deploy ‘up to 400 National Guard Troops’ to do nothing,” the president tweeted Thursday. “The crime rate in California is high enough, and the Federal Government will not be paying for Governor Brown’s charade. We need border security and action, not words!”

There was no immediate comment from Brown’s office in Sacramento. But the seesawing exchanges continued to play out on Twitter, where an account operated by the California National Guard said the state had “written confirmation” that the Pentagon will pay for the troop deployment agreed upon with Brown.

“In short, nothing has changed today,” the Guard tweeted.

Trump’s threat to yank funding also appeared to undercut a statement by DHS Secretary Kirstjen Nielsen, who thanked Brown late Wednesday after his office announced the agreement with federal officials.

“Just spoke w @JerryBrownGov about deploying the @USNationalGuard in California,” Nielsen’s tweet read. “Final details are being worked out but we are looking forward to the support. Thank you Gov Brown!”

The order issued by Brown on Wednesday prohibits California Guard troops from aiding the federal government with immigration enforcement, a restriction the Republican governors of Texas, New Mexico and Arizona did not insist upon.

In statements to reporters Tuesday, the chief of the U.S. Border Patrol and two Pentagon officials made no indication that they would reject a limited role for troops in California.

They said they were working with the state to identify other duties the soldiers could perform in support of counternarcotics work.

California lawmakers have declared their state a “sanctuary” from the Trump administration’s immigration crackdown, and the state’s police and public officials are instructed to eschew contact with U.S. Immigration and Customs Enforcement agents.

After his morning tweet, Trump slammed those policies again during a visit to a U.S. military installation in Key West, Fla., where he appeared alongside Nielsen and congratulated her for doing a “fantastic job” stopping seafaring migrants and smugglers from reaching U.S. shores.

After a few words of praise for the U.S. Coast Guard, Trump swung back to the dispute with Brown. 

“Looking at what’s happening in California with sanctuary cities where the people are really going the opposite way. They don’t want sanctuary cities,” Trump said. He added, “There’s a little bit of a revolution going on in California,” an apparent reference to new legal challenges to the policies by some California counties and cities.

Calling once more for a wall at the U.S. border with Mexico, the president said the problem of “human trafficking” had reached unprecedented levels, without providing evidence for his claim. 

“Human trafficking is worse than it’s ever been in the history of this world,” Trump said. “And who would think in this modern-day age? And they’re using very sophisticated equipment, and they use the Internet better than practically anybody uses the Internet. So it really is a big problem.”

At the U.S.-Mexico border, arrests of people who crossed illegally fell last year to their lowest level since 1971.