President Trump, his campaign, and the Republican National Committee filed lawsuits in California federal court Tuesday arguing that a state law requiring him and any other presidential candidates to release their tax returns is unconstitutional, and "a naked political attack against the sitting President of the United States."

The Presidential Tax Transparency and Accountability Act, which was signed into law on July 30,  requires presidential candidates to turn over their tax returns for the past five years in order to be on their party’s primary ballot in the state. The legal challenges claim that states do not have the power to place any conditions on who can run for president, because the Constitution already sets such qualifications.

HOUSE DEMS CITE NIXON IN PUSH FOR TRUMP TAX RETURNS

“The Supreme Court has held that those qualifications are ‘exclusive’ and that States do not have the power to ‘supplement’ them with their own requirements,” the lawsuit from Trump and his campaign states.

Trump and his campaign also argue that there is a First Amendment issue with states restricting people from being able to be on the ballot, in addition to passing legislation which is meant to retaliate against a person for their “political associations or speech.” The lawsuit alleges that this law was specifically meant to target Trump based on his politics, and cites the bill’s history as proof.

The president's complaint notes that a previous version of the bill “nearly identical” to this one was first proposed in the state legislature in 2017, when it was authored by State Senators Scott Wiener and Mike McGuire, only for Weiner to later confess the political nature of the bill. It quotes Wiener as saying: “I authored only one bill that could be characterized as partisan: the presidential tax return bill. It applies to candidates of both parties, but because only Donald Trump refused to disclose, there’s an undertone. I will own that.”

The RNC's complaint makes similar constitutional arguments, saying "the Act is a naked political attack against the sitting President of the United States" which "subverts the franchise for cheap political gain ... and effectively disenfranchises voters by denying their right to associate for the advancement of political beliefs and effectively cast a vote for the otherwise qualified candidate of their choosing."

Additionally, the lawsuit claims, the Ethics in Government Act already imposes requirements for candidates to release financial information, and that this law “supersedes all other similar federal or state disclosure laws.”

“The Democratic Party is on a crusade to obtain the President’s federal tax returns in the hopes of finding something they can use to harm him politically,” Trump's complaint says. “In their rush to join this crusade, California Democrats have run afoul of these restrictions on State power over federal elections.”

TRUMP SUES HOUSE WAYS AND MEANS COMMITTEE, NEW YORK STATE OFFICIALS TO PROTECT HIS TAX RETURNS

California Secretary of State Alex Padilla and Attorney General Xavier Becerra did not immediately respond to Fox News’ requests for comment.

President Trump’s personal attorney, Jay Sekulow, blasted the law as “flagrantly illegal.”

"Today we have taken decisive action in federal court challenging California’s attempt to circumvent the U.S. Constitution,” Sekulow said in a statement. “The issue of whether the President should release his federal tax returns was litigated in the 2016 election and the American people spoke. The effort to deny California voters the opportunity to cast a ballot for President Trump in 2020 will clearly fail. Legal scholars from across the political spectrum have roundly condemned this flagrantly illegal statute. We are confident the courts will as well.”

CLICK HERE TO GET THE FOX NEWS APP

RNC Chairwoman Ronna McDaniel called the law "desperate" and a "stunt" by Democrats.

"It certainly doesn’t bode well for Democrats heading into 2020 that their best bet for beating President Trump is to deny millions of Californians the ability to vote for him," she said.

Both lawsuit seek a declaratory order from the court stating that California's law is illegal, and an injunction against its enforcement.

The Associated Press contributed to this report.