Democratic state lawmakers are moving forward with a plan that could keep President Donald Trump off the ballot in New Jersey next year unless he releases his long-sought tax returns.

The Democrat-controlled state Senate on Thursday passed a bill that would require candidates for president and vice president to disclose their tax returns from the previous five years to get their name on the Garden State’s ballot.

The measure, if enacted, would also ban those who represent New Jersey in the electoral college from voting for a candidate who did not release his or her returns.

The legislation (S119/A1230) doesn’t specifically mention Trump, but he’s clearly the inspiration. The Republican president was the only major-party presidential candidate in four decades not to make his tax returns public. And Democrats across the country have spent the last few years seeking those documents.

Republican state lawmakers have heavily criticized the bill, and have asked whether the measure would hold up to a legal challenge.

The Senate passed the bill, 24-11, along party lines Thursday at the Statehouse in Trenton. It still needs to pass the Democrat-controlled state Assembly before Gov. Phil Murphy has a choice to sign it into law or veto it.

State Senate Majority Leader Loretta Weinberg, D-Bergen, said there are two reasons releasing tax returns should be mandatory for those seeking the White House. One, she said, is that voters deserve to know every candidate “without compromise.”

“They must know, unequivocally, that the person they vote for is invulnerable to blackmail, coercion or intimidation of any kind due to financial liabilities,” Weinberg said.

Two, she said, is that voters have the right to know that “no action taken by an administration is motivated by personal financial gain, as opposed to the good of the republic.”

Still, state Sen. Joseph Pennachio, R-Morris, said Democrats are showing hypocrisy because New Jersey’s governor and state lawmakers are not required to release their returns. On Thursday, Pennachio suggested an amendment to the bill requiring them to be included, but it was shot down.

“Clearly, their bill is nothing more than a thinly veiled political stunt to keep President Trump off the ballot,” Pennachio said. “It shows that they are unwilling to hold themselves to the same standard”

Murphy has made his tax returns available to the press the last few years, though for only a few hours in one day and without being allowed to make copies.

Then-Gov. Chris Christie — a longtime Trump friend and fellow Republican — conditionally vetoed a previous version of this bill when the Democratic Legislature sent it to him in 2017. Christie called it unconstitutional and a “transparent political stunt masquerading as a bill.”

If the measure is passed, some lawmakers expect a lawsuit challenge.

It’s also unclear how much this would impact Trump if he runs for re-election in 2020. A Republican presidential candidate hasn’t won New Jersey — and its 14 electoral votes — since 1988.

Many other states have introduced similar legislation. Plus, a Democratic congressman from New Jersey, U.S. Rep. Bill Pascrell Jr., D-8th Dist., is leading an effort in Congress to force Trump’s returns to be released.

Polls show U.S. residents want to see Trump’s returns, as well. An ABC News/Washington Post poll released last month shows 60 percent of U.S. residents support their release.

Brent Johnson may be reached at bjohnson@njadvancemedia.com. Follow him on Twitter @johnsb01.

Have a tip? Tell us. nj.com/tips

Get the latest updates right in your inbox. Subscribe to NJ.com’s newsletters.