Attorney Harmeet Dhillon’s successful fight to get President Trump back on the ballot in California was “a victory for voters and the First Amendment,” she told “Fox & Friends First” Friday.

“Ultimately we were able to convince the judge [U.S. District Judge Morrison England Jr.] that this law, S.B. 27, was unconstitutional on a number of different grounds and he issued an injunction that means this law will not go into effect,” she said.

The federal judge in California Thursday granted the Trump campaign’s request to block a new law that requires presidential and gubernatorial candidates to release five years of tax returns to run in the state’s primary elections.

CALIFORNIA JUDGE BLOCKS LAW REQUIRING TRUMP TO SUBMIT TAX RETURNS TO COMPETE IN STATE'S 2020 PRIMARY

The law signed by Gov. Gavin Newsom, a Democrat, would have left the president off of the ballot in California’s March 2020 primary unless he submitted five years’ worth of his tax returns by a Nov. 26 deadline, the Los Angeles Times reported.

TRUMP FILES LAWSUIT IN BID TO PROTECT PERSONAL, CORPORATE TAX RETURNS FROM RELEASE

Trump's lawyers said SB 27 would unfairly force the president to give up his right to privacy. Dhillon said that no presidential candidate will be required to release their taxes as a condition of being on the ballot.

“If it is unconstitutional in California, it is unconstitutional everywhere, and I hope that this will deter other states from foolishly going down this path,” she said.

CLICK HERE TO GET THE FOX NEWS APP

Under SB 27, Trump would be included on the general election ballot in November 2020. Opponents of the law argue depressed GOP voter turnout in the primary could discourage voters from showing up to vote for the president in the main race.

Under California’s so-called jungle primary system, all candidates, regardless of party, vie for the same elected office and the top two vote-getters move on to the general election. Since it was implemented in California in 2010, this system has often ensured a Democrat-on-Democrat general election battle in all but "The Golden State's" most conservative areas. Depressed GOP turnout in primaries could mean even fewer Republicans move on to general elections.

Fox News' Danielle Wallace contributed to this report.