California filed a lawsuit against President Donald Trump's administration in an effort to block the administration's recent move to cancel nearly $1 billion in funding for the state's high-speed rail project.

Last Thursday, the Federal Railroad Administration announced it would yank the $928 million contract it entered into with California because the state had not been keeping up with its end of the bargain and had "failed to make reasonable progress on the project." The deal required California to construct a 119-mile segment in the Central Valley by 2022, a deadline that the FRA says the state will be unable to meet in time.

The FRA also accused California of abandoning an initial plan that would create a high-speed rail route between San Francisco with Los Angeles.

California Gov. Gavin Newsom called the move by the Trump administration illegal and political retribution against the state for its resistance to several of Trump's immigration policies over the last few years.

"The real motive underlying FRA’s action was political: to punish California for opposing President Trump’s proposed border wall,” the state plans to argue, according to a report from The Sacramento Bee. "There is no reasonable alternative explanation for FRA’s abrupt and unprecedented action or the manner in which it disregarded its own practice and established principles of fairness and due process."

California also intends to filed for a temporary restraining order that would block the administration from awarding the money to another project.

"While this project has long been a political football, our determination to get the work done and bring high-speed rail to California is undaunted. This project is the right thing to do from a mobility, environmental and economic standpoint. It’s right for California and the nation," High-Speed Rail Authority Chairman Lenny Mendonca said Tuesday at a board meeting.

“The failed Fast Train project in California, where the cost overruns are becoming world record setting, is hundreds of times more expensive than the desperately needed Wall,” Trump tweeted in February.