SACRAMENTO, Calif. (AP) — The Trump campaign and Republican Party sued California on Tuesday over a new law requiring presidential candidates to release their tax returns to run in the state's primary, legislation that was aimed at prying loose President Donald Trump's returns.

California's law is "a naked political attack against the sitting President of the United States," the state and national Republican parties argued in one of two lawsuits filed in U.S. District Court in Sacramento.

The law signed last week by Democratic Gov. Gavin Newsom requires candidates for president and governor to release five years of tax returns to appear on the state's primary ballot, but the requirement does not extend to the general election. Trump has refused to release his returns, saying they are under audit.

The lawsuits argue the law violates the U.S. Constitution by creating an extra requirement to run for president and deprives citizens the right to vote for their chosen candidates. The Constitution puts just three requirements on presidential candidates: That they are natural born citizens, 35 or older and a U.S. resident for at least 14 years.

California is the first state to pass such a law, though many others under Democratic control have tried since Trump left office.

California holds its 2020 presidential primary on March 3. Without a serious Republican competitor, Trump would likely be able to forego the state's primary and still win the nomination.

But the parties' lawsuit argues it will "directly impede" Trump's ability to secure the nomination. California provides 14% of the delegates needed to win the party's nomination, the suit says.

Trump counsel Jay Sekulow called the law "flagrantly illegal," and said voters already spoke in 2016 on whether Trump should release his tax returns.

"The effort to deny California voters the opportunity to cast a ballot for President Trump in 2020 will clearly fail," Sekulow said in a statement.

It's the latest legal battle between the Trump administration and California, which has sued the federal government more than 50 times since Trump took office.

Tax returns reveal sources of income, charitable giving, business dealings and other information that Democrats in the state Legislature say is essential for voters. Every president has released his or her tax returns since the early 1970s.

"There's an easy fix Mr. President -- release your returns as you promised during the campaign and follow the precedent of every president since 1973," Newsom tweeted.

The Trump campaign, meanwhile, argued in its suit that Democrats are "on a crusade to obtain the President's federal tax returns in the hopes of finding something they can use to harm him politically."

Republicans also say keeping Trump off the ballot could depress voter turnout in the primary, hurting Republicans in other races down ticket, such as for the state Legislature. That could hurt the party's chances of being in the general election in some races, given California's top-two primary system that sends the two highest vote getters in the primary to the general election regardless of party.

The U.S. Supreme court has previously halted state efforts to add ballot access rules for congressional candidates. Former Gov. Jerry Brown, also a Democrat, vetoed a similar law two years ago, arguing it would create a slippery slope of trying to force candidates to release additional information to run for president.

At least two other lawsuits have already been filed.