As votes were counted and winners announced across the country for Tuesday’s midterm elections, President Trump’s Twitter was full of praise — for himself.

Throughout the day, Trump’s Twitter account was dominated by messages urging people to vote and last-minute endorsements. But early Wednesday morning, after tweeting about “tremendous success” and giving thanks “to all” even as race calls were still coming in, the president shifted his focus.

Coming across Fox Business Network’s live election coverage, Trump appeared to take delight in hearing the favorable comments made about him and eagerly shared the compliments with his 55.5 million Twitter followers.

At 1:27 a.m., Trump posted the first half of a quote — the second part came shortly after — from conservative economist and actor Ben Stein, who appeared on Tuesday night’s election show. During the segment, Stein lauded Trump as “the magic man."

Following Democratic House gains and Republican Senate gains, The Fix's Aaron Blake analyzes the winners and losers from the 2018 midterm elections. (JM Rieger/The Washington Post)

“There’s only been five times in the last 105 years that an incumbent president has won seats in the Senate in the off-year election,” Stein said. “Mr. Trump has magic about him. This guy has magic coming out his ears. He is an astonishing vote-getter, an astonishing campaigner. Republicans are unbelievably lucky to have him, and I’m just awed at how well they’ve done.”

Stein went on to point out that although it was expected that Democrats would take the House, it was done “very, very narrowly” and added that they are “making no pickups at all in the Senate.”

“It’s all the Trump magic,” he said.

Hours later, Trump shared Stein’s fawning comments about him in two tweets 10 minutes apart.

The self-congratulatory tweeting didn’t stop there. The tweets with Stein’s plaudits were quickly followed by another in which the president quoted Fox Business anchor David Asman — from the very same segment with Stein.

Asman, who agreed with Stein’s assessment of Trump’s “magic,” credited the president with the “Republican victory.”

“Think of how his position with Republicans improves,” Asman said of Trump. “All the candidates who won tonight because of what he did in campaigning for them owe him their political career."

Trump concurred.

On Twitter, Trump tweeted Asman’s words — with some light editing this time — and added, “Thanks, I agree!”

Trump made 11 appearances across eight states in an attempt to galvanize Republican voters in the days leading up to the midterms. His efforts proved fruitful as Republicans claimed hotly contested Senate races in Indiana, Missouri, Florida, North Dakota and Texas, The Washington Post reported. Senate seats were flipped in Florida, Indiana and Missouri, three states Trump visited multiple times during his campaign blitz.

Still, the elections weren’t a sweeping victory for the GOP. Democrats took control of the House, claiming at least 219 seats, and won governorships in a number of states.

“Tomorrow will be a new day in America,” House Minority Leader Nancy Pelosi (D-Calif.) said Tuesday night.

Trump’s Twitter account made no mention to the Republicans' critical loss, though he did call Pelosi to congratulate her, The Post reported.

His tweets quoting Stein and Asman were met with mixed reactions. Though many congratulated the president, others were much more critical.

“Imagine being the most powerful man on earth and tweet-quoting Ben Stein to feel good about yourself,” one person tweeted.