WASHINGTON (Reuters) - California and its high-speed rail authority filed suit on Tuesday to prevent the Trump administration from canceling a nearly $1 billion federal grant awarded in 2010 for a “bullet” train project hobbled by extensive delays and rising costs.

FILE PHOTO - California Governor Jerry Brown's name and others are pictured on a railroad rail after a ceremony for the California High Speed Rail in Fresno, California January 6, 2015. REUTERS/Robert Galbraith

The lawsuit, filed in federal court in San Francisco, claims the U.S. Transportation Department lacks authority to withhold the $929 million in question, which the Obama administration allocated nearly a decade ago but has remained untapped.

The court challenge seeks an injunction to keep the grant intact. The state also plans to petition for an immediate temporary restraining order to prevent the department’s Federal Railroad Administration (FRA) from redirecting the money to other projects.

In formally canceling the grant last week, the FRA said California had “repeatedly failed to comply” with terms of the allocation and “failed to make reasonable progress on the project.”

But the suit, which was assigned to Judge James Donato, an appointee of President Barack Obama, argues the move stems from President Donald Trump’s “overt hostility to California” and its opposition to his initiative, so far unrealized, to build a wall along the entire U.S.-Mexico border.

Trump first threatened to pull the high-speed rail funding after California Governor Gavin Newsom said in February that he wanted to scale back the $77.3 billion project, beset by rising costs, construction delays and management concerns.

Newsom later said the state remained committed to high-speed rail but would concentrate first on finishing a smaller segment of the line through California’s Central Valley.

In a speech last week, Trump called the project a “disaster” and “totally out of control.”

Beyond the unspent $929 million, the FRA said last week it was considering seeking the reimbursement of $2.5 billion in federal funds the state previously received for the project.

The clash is the latest in an ongoing battle between the Republican Trump administration and Democratic-controlled California over issues ranging from immigration to air quality standards.

The most populous U.S. state has repeatedly challenged the Trump administration in court, and the lawsuit to preserve California’s rail funding was expected.

The Trump administration first said it planned to withhold the money on Feb. 19, which California noted in its suit came one day after it joined 15 other states in suing Trump over his decision to declare an immigration emergency at the southern U.S. border.

The U.S. Transportation Department declined to comment on Tuesday.

California had planned to build a 520-mile (837-km) system that would allow trains to travel at up to 220 miles per hour (354 kph) from Los Angeles to San Francisco in the first phase, with full service beginning by 2033.

Newsom said in February the state would focus instead on finishing a 119-mile segment by 2028 between Merced and Bakersfield, which Trump described last week as running “from this tiny little town to another tiny little town.”

California voters approved the initial $10 billion bond for the project in 2008, and $3.5 billion in federal money was allocated two years later.

By March 2018, total costs projected by the state had jumped to $77 billion, with analysts warning the tally could ultimately exceed $98 billion.