Donald Trump must face a lawsuit over his family foundation by the New York attorney general after the second judge this year refused to accept his argument that sitting presidents can’t be sued in state court.

Trump had argued that the “Supremacy Clause” of the US constitution “immunized the President from being sued in state court while in office.”

But Manhattan Supreme Court Justice Saliann Scarpulla disagreed in a new decision.

The AG sued Trump earlier this year, claiming he illegally used money from the charity to pay off his creditors, decorate one of his golf clubs and help his presidential campaign — all before he was elected.

Because the allegations in the suit do “not involve any action taken by Mr. Trump as president and any potential remedy would not affect Mr. Trump’s official federal duties,” the Supremacy Clause does not apply, Scarpulla ruled.

In June, Scarpulla’s colleague, Justice Jennifer Schecter, made a similar finding in a defamation case brought by former “Apprentice” contestant Summer Zervos.

Trump has appealed that ruling and is awaiting a decision.

Scarpulla also dismissed Trump’s claim that former attorney General Eric Schneiderman — who stepped down in May following a series of sexual misconduct claims — began investigating the Trump Foundation out of personal animus. The Republican president and the Democratic attorney general had a contentious relationship, with Trump once blasting Schneiderman on Twitter as a “lightweight.”

But Scarpulla ruled that “given the very serious allegations set forth in the petition, I find that there is no basis for finding that animus and bias were the sole motivating factors for initiating the investigation and pursuing this proceeding,” she wrote.

She said the attorney general, under state law, is responsible for enforcing laws pertaining to charities including prohibitions against certain political activity.

Schneiderman’s successor, Barbara Underwood, alleges that the foundation allowed itself to be “co-opted” by Trump’s 2016 presidential campaign — raising money to be handed out at campaign events “to advance his political goals.”

Scarpulla noted that Trump signed foundation checks and presented them to veterans’ charities at campaign rallies so the AG can seek double financial penalties.

The suit asks for $2.8 million in restitution.

Underwood welcomed the ruling, saying in a statement: “The Trump Foundation functioned as little more than a checkbook to serve Mr. Trump’s business and political interests. There are rules that govern private foundations — and we intend to enforce them, no matter who runs the foundation.”

Trump’s lawyer Alan Futerfas said, “The decision means only that the case goes forward. As we have maintained throughout, all of the money raised by the foundation went to charitable causes to assist those most in need. As a result, we remain confident in the ultimate outcome of these proceedings.”