This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

WASHINGTON — President Donald Trump on Wednesday celebrated Senate Republican gains in the midterm election but immediately threatened Democrats, who won back control of the House and with it the power to investigate the president’s personal and professional conduct.

Trump has long felt aggrieved by the special counsel’s investigation into Russian interference in the 2016 presidential election. He took to Twitter the morning after the split election outcome for the GOP to put Democrats on notice about their threats to investigate him and the administration. Democrats are also interested in Trump’s tax returns, which he has declined to make public.

“If the Democrats think they are going to waste Taxpayer Money investigating us at the House level, then we will likewise be forced to consider investigating them for all of the leaks of Classified Information, and much else, at the Senate level. Two can play that game!” Trump said.

Hours earlier, the president had tweeted that “now we can all get back to work and get things done!”

Trump faces the prospect, starting next year, of endless investigations after Democrats formally take control of the House, along with stymied policy efforts and fresh questions about the resilience of his unorthodox political coalition.

Still, he celebrated GOP success in expanding the party’s majority in the Senate and seemed to blame losing candidates for distancing themselves from him and his unorthodox methods.

“Those that worked with me in this incredible Midterm Election, embracing certain policies and principles, did very well. Those that did not, say goodbye!” Trump said in a tweet that did not mention the loss of GOP control of the House.

“Yesterday was such a very Big Win, and all under the pressure of a Nasty and Hostile Media!” he added.

Trump was expected to address the results in greater detail at a White House news conference later Wednesday.

On Tuesday, the president telephoned House Democratic leader Nancy Pelosi, a conversation that her office said included congratulations and a nod to her pitch for bipartisanship. And on Wednesday, he said she deserves to be House speaker.

“In all fairness, Nancy Pelosi deserves to be chosen Speaker of the House by the Democrats,” Trump tweeted. “If they give her a hard time, perhaps we will add some Republican votes. She has earned this great honor!”

Widely viewed as a referendum on Trump’s presidency, Tuesday’s results offered a split decision that revealed deep tensions in the American electorate — a rift that could easily widen during two years of divided control of Congress. Trump’s aggressive campaign blitz, which paid off in some key victories, suggests he is likely to continue leaning into the fray.

Control of the House gives Democrats the ability to launch investigations into the president and stifle his agenda. White House press secretary Sarah Huckabee Sanders sought to minimize Democratic gains in that chamber, but called retaining control of the Senate a “huge moment and victory for the president.”

White House aides called on Democrats to work with Republicans in the next Congress.

Said Trump adviser Kellyanne Conway: “I don’t know that there will be much of an appetite for Democrat lawmakers to spend all of their time, or most of their time or even a fraction of their time investigating, instigating, trying to impeach and subpoena people.”

In addition to his conversation with Pelosi, Trump called Republican Senate Majority Leader Mitch McConnell, Republican House Speaker Paul Ryan and Senate Minority Leader Chuck Schumer, as well as other candidates he backed during the race, the White House said.

Trump had aggressively campaigned in the closing days of the race, his focus on boosting Republicans in states he carried in 2016.

In the three races he targeted on the final day, Trump’s picks won Tuesday night, with Republican Mike Braun defeating Democratic Sen. Joe Donnelly in Indiana, Republican Josh Hawley defeating Democratic Sen. Claire McCaskill in Missouri and Republican Attorney General Mike DeWine defeating Democrat Richard Cordray in the race for Ohio governor.