Members of the news media work outside the West Wing of the White House election night in Washington. Credit: Alex Brandon / AP

After an extraordinary night of shifting vote counts and a rebuke of President Donald Trump, news organizations kept vigil Wednesday as Americans waited to learn who their next president would be.

For weeks, media outlets had warned that Americans would need patience on election night and beyond, and that turned out to be their most accurate prediction.

“We don’t know who the next president of the United States will be,” CNN’s John Berman told viewers shortly before 10 a.m. EST on Wednesday.

The overnight hours featured the stunning scene of journalists immediately refuting Trump after he stood behind a White House podium and complained it was “a major fraud on our nation” that he hadn’t been declared the winner.

NBC News’ Savannah Guthrie broke into Trump’s statement to tell viewers that several of Trump’s statements were untrue. “The fact of the matter is we don’t know who won the election,” she said.

CBS News’ Norah O’Donnell said Trump was “castrating the facts” by “falsely claiming that he has won the election and disenfranchising millions of voters whose ballots have not been counted.”

“This is an extremely flammable situation and the president just threw a match into it,” Fox News Channel’s Chris Wallace said.

The Associated Press said that at the time of Trump’s statement, its count had Trump winning 213 electoral votes to Democrat Joe Biden’s 225. The AP has determined that it’s too early to declare a winner in several states, including Pennsylvania, Georgia and Michigan.

With the sun’s rise on Wednesday, it seemed to feel to some like a bad dream they’d like to forget.

“It was ridiculous,” former Ohio Republican Gov. John Kasich said on CNN. “He should not have done that. This is what we have come to expect, but it won’t matter because I think we will count all the votes.”

At 10:35 a.m., Trump tweeted in all caps: “WHAT IS THIS ALL ABOUT?” Twitter took down the rest of his tweet, saying some or all of it is disputed and might be misleading.

Election coverage was proving the primacy of numbers geeks like NBC News’ Steve Kornacki and CNN’s John King, who got granular trying to figure out where things were going. For a while, MSNBC kept a “Kornacki cam” on him as he sifted through returns offstage.

While stressing that things were far from certain, Kornacki said on Wednesday that “it’s Trump right now who has to turn things around on this electoral map.”

Arnon Mishkin, director of Fox News’ decision desk, said on “Fox & Friends” that for Trump to win, he’d need to maintain leads in Georgia and North Carolina and then win either Michigan or Wisconsin. In those two states, “I’d rather be Joe Biden than Donald Trump,” he said.

As midnight passed late Tuesday, the president’s team was angry at Fox News for striking out ahead of other news organizations in declaring that Biden had defeated Trump in the battleground state of Arizona. It was the first indication of a state to flip parties from 2016, and was crucial to 270 electoral votes and victory.

Mishkin went on the air after Fox’s Bret Baier noted that the network was taking “incoming” on the decision. He explained that with the bulk of uncounted votes in Arizona cast early and thus more likely for Biden, Trump would not be able to catch up to the Democrat’s lead in the state.

“I’m sorry, but we’re not wrong in this particular case,” Mishkin said. The AP eventually called Arizona for Biden at 2:52 a.m.

Biden spoke to supporters at 12:42 a.m. in Delaware, expressing confidence in his campaign and saying he wanted to see every vote counted. Judging by Twitter, that seemed to immediately anger his opponent.

“Keep the faith, guys, we’re going to win this,” Biden said.

The president was also upset at news organizations for not declaring him the winner in Georgia and North Carolina, where he held leads. News organizations explained that there was still doubt given there were votes still to be counted in regions where Biden was expected to do well, doubt that lingered into Wednesday morning.

For the first time, The Associated Press wrote stories explaining in detail to readers and members of the news cooperative why it had declared winners in individual states. The AP summarized all those stories in its story that refuted Trump’s claims that he had won.

Even if Biden won, Democrats were sure to face questions about why the race was so close and why predicted gains in Congress didn’t materialize.

And polling experts will also face scrutiny for a second straight presidential election that defied their numbers that Biden had a very clear advantage going into the night.

Story by David Bauder and Lynn Elber.