California is challenging the Trump Administration’s withdrawal of two federal grants totaling $929 million from the state’s beleaguered high-speed rail project, calling the move “arbitrary, capricious, an abuse of discretion” and contrary to federal law.

In officially terminating the grants on May 16, the Federal Railroad Administration said in a statement that the California High Speed Rail Authority “repeatedly failed to comply” with terms of the original $2.5-billion American Recovery and Reinvestment Act funding agreement, citing numerous violations as well as submittal of flawed budget estimates. The agency also claimed that CHSRA “failed to make reasonable progress” on the project, which has been beset by delays and rising costs since construction got underway in 2015. Over the past decade, cost estimates for full build-out have swollen to two to three times the original 2008 projection of $33.6 billion.

FRA also cited Dem. Gov. Gavin Newsom’s February postponement of all but the project’s initial 171-mile segment between Bakersfield to Merced as evidence that California “has abandoned its original vision of a high-speed passenger rail service connecting San Francisco and Los Angeles, which was essential to its applications for FRA grant funding.”

California’s lawsuit, filed in U.S. District Court for Northern California on May 21, counters that it is the FRA and U.S. Dept. of Transportation that have failed to meet their respective legal obligations, departing from longstanding administrative practices on a project it says is critical to the state’s transportation, environmental and climate change goals.

The complaint asserts that over the past year, FRA “stopped cooperating on the project,” claiming the agency refused to process environmental clearances, and failed to recognize “millions of dollars” in state matching funds required by the grant agreement. The complaint adds that CHSRA was not made aware of or given an opportunity to address the “supposed non-compliance” allegations before the grants were terminated. In prior years, the lawsuit claims, FRA repeatedly recognized that CHSRA was making substantial progress on the project and complying with terms of the grant agreement.

In addition, the complaint notes that FRA’s February 19, 2019, letter of intent to terminate the grant agreement came a day after California and 15 other states filed suit against President Trump’s emergency declaration to build a wall along the southern U.S. border. In addition to vacating the FRA’s decision to terminate the grants, the lawsuit asks the court to enjoin FRA and USDOT from reallocating or transferring the funds to other recipients.

“This is California’s money, appropriated by Congress,” Gov. Newsom said in a statement, “and we will vigorously defend it in court.”