Alan Dershowitz said in the lead-up to the 2016 election that Donald Trump was more corrupt than Hillary Clinton.

"There's no comparison between who has engaged in more corruption and who is more likely to continue that if elected President of the United States," he said.

The former Harvard law professor is now defending the president in the ongoing impeachment trial.

Despite being a vocal opponent of Trump's views on various matters, Dershowitz said he is representing the president "on principle."

Visit Business Insider's homepage for more stories.

Constitutional lawyer Alan Dershowitz said in 2016 that Donald Trump was more corrupt than Hillary Clinton and could be expected to continue being corrupt if he was elected president.

Now, Dershowitz is a member of the president's impeachment defense team.

Dershowitz, a retired Harvard Law School professor, made the comments while appearing on the radio show Trending Today USA in 2016, in response to a question about the Clinton Foundation, as CNN reported.

"When you compare that to what Trump has done with Trump University, with so many other things, I think there's no comparison between who has engaged in more corruption and who is more likely to continue that if elected President of the United States," he said. "So I think what we're doing is we're comparing, we're saying, look, neither candidate is anywhere close to perfect, let's vote for the less bad candidate."

Alan Dershowitz speaking at Trump's impeachment trial. Associated Press

Trump University was a for-profit real estate training program that became defunct amid fraud allegations and class action lawsuits. In February 2018, a federal judge upheld an agreement that required the president to shell out $25 million to settle three lawsuits. Trump claimed that he could have won the case at trial, but instead chose to focus on his duties as president.

Dershowitz also criticized Trump in his book 'Electile Dysfunction'

The radio interview wasn't the only time the constitutional scholar and criminal lawyer criticized Trump during the run-up to the election.

In his 2016 book, titled "Electile Dysfunction: A Guide for Unaroused Voters," Dershowitz described Trump as a "destabilizing and unpredictable candidate" who "openly embraces fringe conspiracy theories peddled by extremists," NBC News reported.

He also wrote that Trump blatantly disregarded political, personal and professional protocol.

Dershowitz described Trump as a New York City real estate mogul who became "famous for firing people; has exploited bankruptcy laws to hurt small-business owners, workers, and other creditors; has insulted large groups of people comprising a majority of voters (women, Latinos, the physically challenged, Muslims); has used vulgar words on TV that offend Christians, parents of young children, and family-oriented people of all backgrounds."

President Donald Trump and attorney Alan Dershowitz at a Christmas eve dinner at Mar-a-lago in 2019. Associated Press

Dershowitz also seemed concerned by Trump's foreign policy views, saying that it was evident he was "prepared to violate existing international and domestic laws, as well as widely accepted principles of human rights."

Worse still, he wrote in the book, was how Trump had "lurched into the realm of dog-whistle anti-Semitism by half-heartedly courting the support of white-nationalist bigots."

Dershowitz, as a guest on the Jamie Weinstein Show, also noted that Trump appeared to lack the guts to challenge the so-called alt-right movement when he was a guest

"I think he's a canny politician and he knows he can't win this election without the alt-right — without getting people to vote for him, whose views he disapproves of. But he hasn't had the courage to really stand up to the alt-right in the way he should," he said.

Observing a "kind of fascist mentality" permeating society, Dershowitz said he didn't "worry that Donald Trump will try to govern that way." He was worried, however, that Trump would "embolden and strengthen some of the fascist elements in our society."

Dershowitz said he was campaigning for Hillary Clinton at the time

When asked about his past commentary on the president, Dershowitz told NBC News: I was campaigning for Hillary Clinton at the time. I hadn't really ever met President Trump and it was just typical campaign rhetoric. I would not repeat that characterization today having met him."

Dershowitz recently made headlines for contradicting a constitutional stance he took former President Bill Clinton's impeachment trial. In 1999, he said that there "doesn't have to be a crime" to impeach a president; it's enough if the president is "somebody who completely corrupts the office."

Attorney Alan Dershowitz arrives at the Senate to join President Donald Trump's legal team during the impeachment trial of the president on charges of abuse of power and obstruction of Congress, at the Capitol in Washington, Monday, Jan. 27, 2020. AP Photo/J. Scott Applewhite

Now, however, he is asserting that "criminal-type behavior is required." Dershowitz plans to argue that the offenses Trump was charged with — abuse of power and obstruction of Congress — aren't actual crimes so can't justify ousting him from office.

In an opinion letter to The New York Times, Dershowitz answered the lingering question of why he said "yes to Trump."

"I have stood on principle, representing people with whom I disagree as well those with whom I agree. I have never made a distinction based on partisanship," he wrote.

Read more:

A Trump impeachment lawyer says he will defend the president by arguing that even if he did abuse his power, he hasn't committed any actual crimes

Alan Dershowitz says none of the revelations in John Bolton's new book constitute an impeachable offense for Trump

Trump's defense team in his Senate impeachment trial will include Alan Dershowitz and Ken Starr

Judge signs off on $25 million settlement in lawsuit against 'fraudulent' Trump University