OSAKA, Japan – President Donald Trump responded to recent criticism from Jimmy Carter by calling him a "nice man" but a "terrible president."

Carter told a crowd Friday that a full investigation into Russian election interference would show Trump did not win the 2016 election and that he ascended to the presidency by way of the Russians. In response to a question, Carter appeared to question the legitimacy of Trump's presidency.

"It’s a typical talking point," Trump said during a press conference in Japan following his meeting with world leaders at the G-20 conclave.

Carter, a Democrat, made his remarks during a panel discussion on human rights with his former Vice President Walter Mondale.

Historian Jon Meacham, the moderator, asked Carter about Russian meddling in the 2016 election, which American intelligence agencies have confirmed did occur.

'I did say it':Trump defends his exchange with Vladimir Putin over election meddling

"The president himself should condemn it, admit that it happened," Carter said. "There's no doubt that the Russians did interfere in the election. And I think the interference, although not yet quantified, if fully investigated, would show that Trump didn't actually win the election in 2016, he lost the election, and he was put into office because the Russians interfered on his behalf."

Meacham then asked if Carter thought Trump is therefore an "illegitimate president."

"Based on what I just said, which I can't retract," said Carter, drawing a laugh from the crowd in Leesburg, Virginia. The event was hosted by Carter's humanitarian organization, the Carter Center.

Trump and Putin:At G20, Trump tells Putin playfully: 'Don't meddle in the election.' Putin laughs

Former special counsel Robert Mueller's investigation also found Russia interfered in the election in order to help Trump win. Mueller's report revealed that members of Trump's campaign showed interest in benefiting from Russian government efforts but investigators did not find evidence that their conduct amounted to a crime.

Trump, who is in Japan with other world leaders at the G-20 summit, told Russian President Vladimir Putin on Friday to not interfere again in a U.S. election, but in a playful tone.

Surrounded by cameras and reporters, Trump said in a joking manner, "Don't meddle in the election, president." He then wagged his finger at Putin and repeated, "Don't meddle in the election."

Trump and Carter:After phone call about China, White House says Trump 'always liked' Jimmy Carter

Mondale also didn't hold back on Trump, calling him a cheerleader for a global "right-wing surge."

"He openly loves authoritarian leaders, has contempt for democratic leaders," he said. "He's got something deep in him that is detestable."

Mondale also suggested Trump has "psychological problems."

"Doctors tell me that they think they recognize symptoms of psychological problems," he said. "You can also predict now what he's going to do. It's going to be about him, it's going to celebrate him, he's going to be right and we're going to be wrong. No matter what goes on, that's what he does. There's some need in him to do that."

Carter and Trump's relationship has been at times both contentious and congenial. Trump has referred to Carter as the worst U.S. president in history on numerous occasions. Carter has taken his own digs at the president, calling him "a disaster" to the Washington Post and "careless with the truth" to CBS News.

However, the two held a friendly phone call in April phone to discuss trade negotiations with China. After the call, the White House said in a statement, "The President has always liked President Carter and First Lady Rosalynn Carter."

Contributing: David Jackson and Michael Collins