President Trump sued California on Tuesday over a state law requiring presidential candidates to release their tax returns for their name to appear on the primary ballot.

The federal lawsuit argues the "Presidential Tax Transparency and Accountability Act" signed last month by California Democratic Gov. Gavin Newsom is “unconstitutional.”

“Though states may exercise some control over elections, they cannot do so in a way that burdens a candidate’s First Amendment rights,” Trump's lawyer William Consovoy said in the lawsuit filed in the U.S. District Court for the Eastern District of California.

The law is aimed at Trump, who has refused to release his tax returns despite repeated demands from Democrats.

New York recently passed a law giving congressional committees access to Trump’s state tax returns. A judge last week blocked New York from turning over Trump’s state tax returns to congressional Democrats while Trump’s challenge to the law plays out.

In California, even if the law holds up to a legal challenge, Trump could chose to not compete in the state’s primary. He likely won’t need the state’s delegates to win the Republican nomination with no serious primary challenger.