Trump lawyer Alan Dershowitz argued Wednesday in the Senate that a quid pro quo cannot result in impeachment if the president believes it “will help him get elected in the public interest.”

During Wednesday’s question and answer session in the impeachment trial, Dershowitz—who previously had claimed he wasn’t a “full-fledged member” of President Donald Trump’s impeachment defense squad—answered a question submitted by Sen. Ted Cruz (R-TX) on whether it matters if Trump dangled military aid to Ukraine in return for a probe into potential election rival Joe Biden. (Cruz argued Tuesday night on Fox News that, in fact, it doesn’t matter if Trump engaged in such a quid pro quo with Ukraine.)

Arguing that there are three possible motives for a president to engage in a quid pro quo in foreign policy—personal interest, public interest, and financial interest—Dershowitz argued that a president withholding money to a foreign country so as they will help in his election would be within the public interest, which is not impeachable.

“Every public official that I know believes that his election is in the public interest, and mostly you’re right,” Dershowitz declared. “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.”

“It cannot be a corrupt motive if you have a mixed-motive that partially involves the national interest," he added. “And does not involve personal pecuniary interest.”

To make his case, Dershowitz pointed to Abraham Lincoln telling General William Sherman “to let the troops go to Indiana so that they can vote for the Republican Party” in the 1864 election.

“Let’s assume the president was running at that point and it was in his electoral interest to have these soldiers put at risk the lives of many, many other soldiers who would be left without their company, would that be an unlawful quid pro quo?” Dershowitz pondered. “No, because the president, A: believed it was in the national interest, but B: he believed that his own election was essential to victory in the Civil War.”

“Every president believes that,” he added. “That’s why it’s so dangerous to try to psychoanalyze a president, to try to get into the intricacies of the human mind.”

Lead House impeachment manager Rep. Adam Schiff (D-CA), meanwhile, was asked a follow-up question by the Democrats, asking him to respond to Dershowitz's assertion that a president could essentially do anything to secure re-election.

After saying Barack Obama would have definitely been impeached in 2012 if he promised to withhold military aid to Russian foe Ukraine if the Russian president promised to investigate his election opponent Mitt Romney, Schiff argued that Dershowitz was saying presidents had free rein to ask for foreign powers to interfere in elections on their behalf.

“Now, bear in mind, that efforts to cheat in an election are always going to be in proximity to an election, and if you say you can’t hold a president accountable in an election year where they’re trying to cheat in that election, then you are giving them carte blanche,” the Democratic lawmaker stated. “So all quid pro quos are not the same. Some are legitimate and some are corrupt, and you don’t need to be a mind reader to figure out which is which. For one thing, you can ask John Bolton.”

The president is accused of withholding military aid to Ukraine in exchange for Ukrainian officials publicly announcing probes into his domestic political rivals, including Democratic presidential candidate Joe Biden. Former National Security Adviser John Bolton, a potential witness in the Senate trial, has alleged in an upcoming book that Trump told him last August that he was freezing Ukrainian aid until they investigated Biden.