MANHATTAN (CN) – Trading courtroom blows for over an hour with the New York attorney general, a lawyer for the Trump Foundation struggled Thursday to secure dismissal of claims that the entity is a “shell corporation.”

Filed against President Trump, his children, and the charity earlier this year, the lawsuit by Attorney General Barbara Underwood accuses the foundation of being little more than a checkbook for Trump’s campaign and personal projects.

Trump’s attorney Alan Futerfas bristled at the allegation Thursday inside a packed room of the Manhattan Supreme Court, gesturing to the logos of various charities displayed on a giant monitor behind him.

“This is a gift to the campaign?” Futerfas asked incredulously, pointing to a logo of the veterans’ charity that benefited from a fundraiser held days before the Iowa caucuses.

“This is where the money went,” he exclaimed.

Judge Saliann Scarpulla quickly went to the heart of the matter.

“At the time of that fundraiser, Mr. Trump was a presidential candidate, am I right?” she asked.

“Yes, he was,” Futerfas replied.

New York prosecutors allege in a civil petition that Trump violated prohibitions against “improper related party transactions” by blurring the lines between his charity and the campaign.

“It’s not incidental publicity,” she noted. “It’s someone-who’s-running-for-president-of-the-United-States kind of publicity.”

She asked: “Is that not squarely in the statute?”

Trump’s attorney likened that Iowa fundraiser to other political events that benefit charities, noting that the Al Smith Dinner took place on Oct. 18. This year’s event – an annual white-tie fundraiser for Catholic charities – featured retiring U.S. Ambassador Nikki Haley, New York Governor Andrew Cuomo and Mayor Bill de Blasio.

Futerfas also equated it with making a major donation to get one’s name on Avery Fisher Hall.

But Scarpulla noted a crucial distinction: None of these examples of philanthropy involved a charity for a candidate driving the donation.

Gesturing again to the logo, Futerfas emphasized that the donations ultimately made it to the beneficiary.

“Every dime of the $2.8 million went here,” Futerfas said.

“There was no mention of the foundation at that fundraiser,” he added.

Yael Fuchs, an attorney with Underwood’s office, noted that charitable giving does not a charity make.

“It is also undisputed that the Trump Foundation donated money to charity,” Fuchs said. “Your honor, I have donated money to charity. People in the room have donated to charity.”

“That wouldn’t be a foundation under New York law,” she added.

Fuchs called the Trump Foundation’s characterization of its role as a “passive recipient” in the Iowa donations a dodge.

“To use the modern parlance, that’s not a thing,” she quipped, to laughter in the courthouse.

The Trump Foundation’s donations to dozens of other charities has been an ongoing talking point to the press, but Scarpulla repeatedly called that point irrelevant to a motion to dismiss.

“I think that goes to the issue of damages rather than the liability,” she noted.

Since the day of the lawsuit’s filing, the Trump Foundation has been quick to accuse Attorney General Underwood of political bias. The investigation began under her predecessor Eric Schneiderman, and Underwood inherited the probe after a sexual-misconduct scandal toppled him.

“This is what’s troubling about the case,” Futerfas said. “You’ve got the AG’s office making claims about people engaging in waste, real waste.”

“My point is, I think it colors the picture here, and it’s not a pretty picture,” he added later.

Stopping this political bias soliloquy in its tracks, Scarpulla called it immaterial to whether the allegations are plausible enough for the case to proceed.

“The color is whatever you put on it or the AG puts on it, but it’s not something that’s really of interest to me,” she said.

Scarpulla indicated that she would not rule on the matter until an appeals court rules on a foundational issue: whether a state court has jurisdiction in a lawsuit against a president of the United States.

The issue is currently coming to a head in the defamation lawsuit brought by former “Apprentice” contestant Summer Zervos, who recently won the right to order Trump’s deposition.

Rejecting the president’s assertion of immunity, the ruling in that case has stern words for Trump: “No one is above the law.”

This story is developing…