SACRAMENTO, Calif. — California has sued to block the administration of President Donald Trump from cancelling nearly $1 billion for the state's high-speed rail project.

The lawsuit filed Tuesday comes after the administration revoked the funding last week.

Democratic Gov. Gavin Newsom has called the move illegal and says it's political retribution for California's resistance to Trump's immigration policies.

The state also plans to file for a temporary restraining order blocking the administration from awarding the money to another project.

The $929 million comes with the requirement that California complete a 119-mile segment of track in the state's Central Valley agricultural heartland and environmental work on the entire line by 2022.

The Federal Railroad Administration says California can't meet that deadline.

The state ultimately hopes to link Los Angeles and San Francisco.