President Donald J. Trump meets with Vice Premier of the People's Republic of China Liu He in the Oval Office at the White House on Thursday, Jan. 31, 2019 in Washington, DC.

Gov. Gavin Newsom vowed a fight to keep the money and said the move was in response to California again suing the administration , this time over Trump's emergency declaration to pay for a wall along the U.S.-Mexico border.

The U.S. Department of Transportation announcement follows through on President Donald Trump's threats to claw back $3.5 billion that the federal government gave to California to build a bullet train between Los Angeles and San Francisco.

The Trump administration said Tuesday that it plans to cancel $929 million awarded to California's high-speed rail project and wants the state to return an additional $2.5 billion that it has already spent.

"This is clear political retribution by President Trump, and we won't sit idly by," Newsom said in a statement. "This is California's money, and we are going to fight for it."

It's the latest spat between the White House and California. Trump earlier in the day linked the emergency declaration lawsuit to the train, noting that California filed the challenge on behalf of 16 states.

"California, the state that has wasted billions of dollars on their out of control Fast Train, with no hope of completion, seems in charge!" the president tweeted.

The train project has faced repeated cost overruns and delays since California voters approved it in 2008. The Trump administration argued Tuesday that the state hasn't provided required matching dollars and can't complete certain construction work by a 2022 deadline.

Newsom declared in his first State of the State address last week that he planned to scale back the project and focus immediately on building 171 miles (275 kilometers) of track in central California. His office said he still plans to complete the full line, although he said the current plan would cost too much and take too long.

He's pledged to continue environmental work on the full line, which is required to keep the federal money.

But the U.S. Department of Transportation said Newsom's comments last week reinforced the administration's concerns about the project.

"Governor Newsom presented a new proposal that represents a significant retreat from the State's initial vision and commitment and frustrates the purpose for which Federal funding was awarded," read the letter outlining the case for cancelling the money.

Congress nearly a decade ago approved the $929 million that Trump wants to cancel. The state has not started spending that money. But it has already spent the extra $2.5 billion that Trump now wants back.

The U.S. Department of Transportation said it is "actively exploring every legal option" to get back the money.

The grant agreement between California and the federal government, signed in 2010, outlines several scenarios in which the federal government could take the money back. It can take the money back, for example, if the grantee fails to make "adequate progress" or "fails to complete the project or one of its tasks" or if the state doesn't meet its matching fund requirements.

If the federal government decides to take the money back, it doesn't have to wait for California to write a check. The agreement states the federal government could offset the money it would pay California for different transportation or other projects.

California hasn't yet fully matched the $2.5 billion in stimulus money. It's in the process of doing so now, using money from the 2008 bond passed by voters and revenue from the state's cap-and-trade program. It can't unlock the $929 million grant until it completes its match.

Still, the California High-Speed Rail Authority has already budgeted for the full $3.5 billion. It's put toward constructing a 119-mile (191.5-kilometer) segment of track in the Central Valley expected to cost $10.6 billion.

Dan Richard, the outgoing chair of the California High-Speed Rail Authority's board of directors, said people's livelihoods depend on the project through jobs and other economic development in the Central Valley.

"It would be very important to avoid anything that would disrupt the economic recovery in the Central Valley that has been brought about by high-speed rail," he said.