A London court on Wednesday heard claims from Julian Assange’s lawyer that President Trump offered to pardon the WikiLeaks founder if he said Russia was not behind the massive leak of Democratic party emails during the 2016 presidential campaign.

Assange’s lawyer, Edward Fitzgerald, made the claims during a preliminary hearing at Westminster Magistrates’ Court ahead of an extradition hearing next week.

Citing a statement from another Assange lawyer, Fitzgerald said that in August 2017, then-Republican Congressman Dana Rohrabacher visited Assange at the Ecuadorian embassy in London.

The lawyer, Fitzgerald said, recounted "Mr. Rohrabacher going to see Mr. Assange and saying, on instructions from the president, he was offering a pardon or some other way out, if Mr. Assange ... said Russia had nothing to do with the DNC leaks."

The White House did not respond to Fox News' request for comment.

Emails embarrassing for the Democratic National Committee and Hillary Clinton's presidential campaign were hacked before being published by WikiLeaks in 2016.

ASSANGE'S FATHER FEARS SON'S EXTRADITION TO US AS WIKILEAKS LEADER'S HEALTH IMPROVES

Assange, who is fighting extradition to the U.S. on spying charges, appeared in court Wednesday by video-link from Belmarsh prison where he is being held while awaiting his extradition hearing.

U.S. prosecutors have charged Assange with espionage over WikiLeaks' hacking of hundreds of thousands of confidential government documents. If found guilty, he faces up to 175 years in jail.

He argues he was acting as a journalist entitled to First Amendment protection.

Assange spent seven years in Ecuador's embassy after holing up there in 2012 to avoid questioning in Sweden over unrelated sexual assault allegations. He was evicted from the embassy in April 2019 and arrested by British police for jumping bail in 2012.

CLICK HERE TO GET THE FOX NEWS APP

Sweden dropped the sex crimes investigation in November because so much time had elapsed.

Assange’s full extradition hearing is due to begin with a week of legal argument starting Monday. It will resume in May, and a ruling is not expected for several months.

The Associated Press contributed to this report.