President Trump sued California Tuesday over a new law requiring presidential candidates to release their income tax returns to run in the state’s primary elections — the latest legal challenge to the law.

The lawsuit, filed by Trump’s personal lawyers in federal court in Sacramento, argues the statute signed into law last week is unconstitutional because it sets up illegal new rules governing who can seek the presidency.

The complaint also alleged that the law retaliates against Trump for his political beliefs and violates his right to free speech under the First Amendment.

The lawsuit follows a similar one filed by Judicial Watch, a pro-Trump, DC-based conservative group, on behalf of four voters registered in California, two Republicans, a Democrat and an independent.

The Republican Party also filed a similar case on Tuesday.

The measure requires presidential candidates to release five years of tax returns in order to appear on a nominating ballot in California, the most populous state.

The bill passed both houses of California’s Democrat-controlled legislature and was signed by Democratic Gov. Gavin Newsom last week.

Trump refused to release his tax returns during the 2016 campaign, defying a practice followed by every presidential nominee for decades.

Last month, the Democrat-controlled House Ways and Means Committee sued the Treasury Department to force the release of Trump’s tax records.

Democrats want the tax returns as part of their inquiry into possible conflicts of interest posed by Trump’s continued ownership of his extensive business interests.

New York Gov. Andrew Cuomo also signed an amendment last month to a law requiring the state’s Department of Taxation and Finance to release any returns sought by congressional committees.

Both efforts have been rebuffed by Team Trump, which argues that his returns remain under audit and that voters don’t care.

The president also sued to block the New York law, and Treasury Secretary Steve Mnuchin has refused to hand Trump’s returns over to the Ways and Means Committee.

A federal judge last week blocked New York from immediately turning over Trump’s state tax returns to Congress.

The order by Judge Carl Nichols, a Trump appointee, bars the state from releasing the president’s tax returns while a lawsuit against the state seeking to keep his records private proceeds.

With Post wires