President Trump's defense lawyer Alan Dershowitz argued Wednesday that a president can’t be impeached for exerting his executive powers to win an election if he believes his victory is in the national public interest.

"Every public official that I know believes that his election is in the public interest," celebrity attorney Dershowitz said at Trump’s impeachment trial, which garnered chuckles from senators in the chamber. "And mostly you're right. Your election is in the public interest."

"And if a president does something which he believes will help him get elected, in the public interest, that cannot be the kind of quid pro quo that results in impeachment," he added.

CHIEF JUSTICE ROBERTS TAKES ON NEW ROLE IN TRUMP'S SENATE IMPEACHMENT TRIAL: STRICT TIMEKEEPER

Dershowitz’s unconventional defense came in the question phase of the trial when senators get to submit written requests to both sides to explain their case on why Trump should or shouldn’t be acquitted for two articles of impeachment: abuse of power and obstruction of Congress.

Sen. Ted Cruz, R-Texas, sparked the response when he asked: "Does it matter if there was a quid pro quo? Is it true that quid pro quos are often used in foreign policy?"

House managers allege that Trump pressured Ukraine to launch investigations into his political rival, Joe Biden, by withholding nearly $400 million in military aid to the country. They charge that Trump engaged in a quid pro quo that was ignoring the national interest -- and the will of Congress -- for the personal political purpose of winning reelection in 2020.

“The only thing that would make a quid pro quo unlawful is if the quo were in some way illegal,” Dershowitz said in an animated speech on the Senate floor.

He made the case that if Trump’s motive for asking Ukraine for help was “mixed” -- both national interest and political gain -- it was not impeachable because it’s not a purely “corrupt” intention.

"A complex middle case is: 'I want to be elected. I think I'm a great president. I think I'm the greatest president there ever was and if I'm not elected, the national interest will suffer greatly,” Dershowitz said. “That cannot be an impeachable offense."

LEV PARNAS MAKES A SCENE AT IMPEACHMENT TRIAL, TELLING SENATORS: 'CALL ME'

Rep. Adam Schiff, D-Calif., called Dershowitz's argument "odd."

Schiff re-upped Democrats' call for testimony from former national security adviser John Bolton, who reportedly has firsthand knowledge that Trump's reason for withholding aid to Ukraine was for the investigations into Joe and Hunter Biden.

“All quid pros [quos] are not the same. Some are legitimate and some are corrupt. You don’t need to be a mind reader to figure out which is which," Schiff said. "For one thing, you can ask John Bolton.”

GAO SAYS TRUMP ADMINISTRATION BROKE LAW BY WITHHOLDING UKRAINE AID

The Government Accountability Office (GAO) issued a legal opinion earlier this month saying that Trump's administration broke the law by withholding defense aid to Ukraine -- the issue at the heart of the president's impeachment trial.