Moments before airing his interview with President Donald Trump in Helsinki, Fox News host Sean Hannity slammed former President Barack Obama for his pre-election rhetoric on Russia.

But Hannity’s remarks were misleading, and the words he attributed to Obama were taken out of context.

"We all know that Russian election meddling is not new at all," Hannity said in his opening monologue on July 16. "And despite this, in 2016, when Hillary Clinton appeared to have a firm lead in the polls — oh, just before the election — it was President Obama who laughed off any notion that American elections could possibly be tampered with."

Hannity pointed to Obama’s remarks at a press conference on Oct. 18, 2016, a day after a stump speech in which Trump announced what he believed was evidence in support of his repeated claims about voter fraud in the 2016 election.

Hannity quoted Obama as saying: "There is no serious person out there who would suggest somehow that you could even rig America's elections. There's no evidence that that has happened in the past or that there are instances in which that will happen this time."

Hannity later read an altered version of the same quote as part of a question for Trump about Russia’s election meddling. Hannity repeated the claim a third time while interviewing guests.

What Hannity did not mention, however, was that Obama’s remarks actually came in response to a reporter’s question about voter fraud and Trump’s claims that the election could be rigged. Obama was not making reference to Russian interference. (For more on Russia’s election meddling, read our on-the-record timeline of events.)

"Donald Trump is telling his supporters that the election is rigged and asking them to monitor certain areas on election day," NPR’s Ayesha Rascoe said. "How concerned are you about the potential for violence? And what about after election day — are you worried the results of the election may be distrusted?"

A more complete version of Obama’s response can be read below, with the portions referenced by Hannity in bold:

"I have never seen in my lifetime or in modern political history any presidential candidate trying to discredit the elections and the election process before votes have even taken place. It's unprecedented. It happens to be based on no facts. Every expert, regardless of political party, regardless of ideology — conservative or liberal — who has ever examined these issues in a serious way will tell you that instances of significant voter fraud are not to be found …

"If you start whining before the game is even over, if whenever things are going badly for you and you lose you start blaming somebody else, then you don’t have what it takes to be in this job. Because there are a lot of times when things don’t go our way, or my way. That’s okay. You fight through it, you work through it. You try to accomplish your goals.

"But the larger point that I want to emphasize here is that there is no serious person out there who would suggest somehow that you could even rig America’s elections, in part because they’re so decentralized and the numbers of votes involved. There’s no evidence that that has happened in the past, or that there are instances in which that will happen this time. And so I’d advise Mr. Trump to stop whining and go try to make his case to get votes."

Hannity is not the first person to pluck out this quote. Trump, who appeared to accept Russian President Vladimir Putin’s denial of Russian election interference during a press conference before Hannity’s interview, did the same in tweets on Feb. 20, 2018.

"(Obama) thought Crooked Hillary was going to win and he didn’t want to ‘rock the boat,’" Trump wrote. "When I easily won the Electoral College, the whole game changed and the Russian excuse became the narrative of the Dems."

“There is no serious person out there who would suggest somehow that you could even rig America’s elections, there’s no evidence that that has happened in the past or that it will happen this time, and so I’d invite Mr. Trump to stop whining and make his case to get votes.” ..... — Donald J. Trump (@realDonaldTrump) February 20, 2018

....The President Obama quote just before election. That’s because he thought Crooked Hillary was going to win and he didn’t want to “rock the boat.” When I easily won the Electoral College, the whole game changed and the Russian excuse became the narrative of the Dems. — Donald J. Trump (@realDonaldTrump) February 20, 2018

Several news and fact-checking websites pointed out that Trump took Obama’s words out of context.

The Obama administration did receive some criticism for its quiet response to Russian interference, which the administration learned of in the months leading up to the election.

But as we have noted in previous fact-checks, it is an exaggeration to say Obama did nothing. By the Oct. 28, 2016, press conference, Obama had personally confronted Putin about it at the G20 Summit in China. Intelligence agencies under Obama’s administration had also accused Russia of being responsible for hacking and leaking emails from the Democratic National Committee and others, issuing a joint statement from the Department of Homeland Security and the Director of National Intelligence.

So Obama did show concern — and he was responding to Trump’s early claims of a rigged election based on voter fraud when he made the comment Hannity singled out.

From Hannity’s side, a Fox News spokesperson pointed to reports from the Washington Post and Reuters that former President Barack Obama was informed of Russian meddling as early as the summer of 2016, months before he stated that "there is no serious person out there who would suggest somehow that you could even rig America’s elections."

Our ruling

Hannity said, "In 2016, when Hillary Clinton appeared to have a firm lead in the polls — oh, just before the election — it was President Obama who laughed off any notion that American elections could possibly be tampered with."

The quote Hannity used was out of context when presented as the basis of a misleading argument about Obama’s response to Russian meddling. Obama was actually responding to Trump’s claims about voter fraud potentially changing the outcome of the election.

We rate Hannity’s statement Mostly False.