Nov. 23 (UPI) -- In a decision Friday, the New York Supreme Court opted not to dismiss a lawsuit against the Trump Foundation on grounds the suit was politically motivated.

The justices denied the request for a dismissal from President Donald Trump, the foundation that bears his name and his three oldest children: Donald Trump Jr., Ivanka Trump and Eric Trump. The New York Attorney General's Office filed the suit in June, saying the foundation has long operated under a "pattern of illegal conduct."

After the court's decision Friday, Amy Spitalnick, a spokesperson for New York Attorney General Barbara Underwood, said on Twitter the suit shows "the Trump Foundation functioned as a personal piggy bank to serve Trump's business & political interests."

The suit stemmed from an investigation started under former state Attorney General Eric Schneiderman, who resigned in May amid accusations he physically abused women.

Trump's lawyers filed the request for the dismissal at the end of August, saying Schneiderman was on a "mission to 'lead the resistance' and attack Mr. Trump whenever possible."

Justice Saliann Scarpulla wrote in a 27-page decision that the court is not aware of sufficient evidence "of a demonstrated conflict of interest or a substantial risk of an abuse of office."

"It is not within the province of the courts to subjectively determine the motivation of a government agency in commencing an enforcement proceeding, or to dismiss the proceeding because of the political disagreements of the parties," Scarpulla wrote.