A billboard sign promoting High Speed Rail prominently displayed along the 99 Golden State Highway in Bakersfield on January 28, 2015. (Photo by Al Seib/Los Angeles Times via Getty Images)

The complaint seeks declaratory and injunctive relief and challenges the Trump administration's decision to pull the nearly $1 billion in funding for the California high-speed rail project. In the court filing, the state notes that it has already committed billions of dollars to the program.

The lawsuit, filed in federal court in San Francisco, follows the Federal Railroad Administration last week pulling a 2010 grant for $1 billion for the high-speed rail project and charging that California's rail authority "failed to make reasonable progress on the project." In addition, the FRA indicated last week that it is continuing to explore "all options" concerning another $2.5 billion in funds already awarded to the state's high-speed rail agency.

LOS ANGELES — California on Tuesday filed a legal challenge to the Trump administration's plans to terminate a grant of nearly $1 billion for the state's high-speed rail project.

In February, President Donald Trump called for California to return $3.5 billion in federal funds for the high-speed rail line planned between San Francisco and Los Angeles. The Department of Transportation followed by announcing its intention to cancel $929 million in grant funds awarded previously but not yet paid out.

Trump's call for the return of money followed California Gov. Gavin Newsom at his first state of the state address on Feb. 12 announcing a reeling in of the state's high-speed rail project, saying the current plan "would cost too much and take too long." He added, "There simply isn't a path to get from Sacramento to San Diego, let alone from San Francisco to LA."

According to the lawsuit, the FRA's action "to abruptly terminate" a 2010 agreement rather than work with the California High-Speed Rail Authority is "a sharp departure from ordinary agency practice." In announcing its termination of the agreement last week, the FRA said California's rail authority "repeatedly failed to comply with the terms of the FY10 agreement."

In addition, the lawsuit charges that the federal government's decision to ax the grant agreement "was precipitated by President Trump's overt hostility to California, its challenge to his border wall initiatives, and what he called the 'green disaster' high-speed rail project."

Construction is underway on the first leg of the bullet train, a 119-mile section in the state's Central Valley. More than $6 billion has already been spent on the California high-speed rail project.

"The Trump administration's action is illegal and a direct assault on California, our green infrastructure, and the thousands of Central Valley workers who are building this project," Newsom said last Thursday after the FRA terminated the nearly $1 billion grant.

In 2008, California voters approved Proposition 1A, authorizing nearly $10 billion in bond money for the construction of the high-speed rail system. Since the vote, though, the project been plagued by delays and cost overruns.

The DOT declined to comment. The White House declined comment.

Separately, California's Attorney General Xavier Becerra late Tuesday announced the state sued the Trump administration over the so-called "conscience" rule, which allows health workers to refuse medical treatment to people, even in emergencies. It marks the state attorney general's 51st lawsuit against the administration.

WATCH: Why the U.S. continues to fail with high-speed rail