Donald Trump – grumpy and perhaps sleep deprived – sought to defend the midterm elections as “an incredible day” for Republicans, despite his party losing the House of Representatives and opening the door to two years of intense scrutiny from Democrats.

Having praised Democratic minority leader Nancy Pelosi on Twitter, saying she deserved to be speaker of the House, he said he was ready to work with Democrats on Capitol Hill.

But during at an appearance at which he repeatedly snapped at the media and ordered reporters to sit down, displaying a degree of venom that was shocking even given his propensity for such attacks, the president made clear that such cooperation depended on them not launching a series of investigations into him or his administration – something many Democrats have already made clear they intend to do.

“It was a big day yesterday, an incredible day,” he said, in what was apparently only his third formal solo news conference at the White House. “Last night the Republican Party defied history to expand our Senate majority while significantly beating expectations in the House.”

Of the potential to work with Democrats, he added: “It really could be a beautiful bipartisan situation.”

Yet he said such cooperation depended on Democrats not seeking to hold endless hearing and investigations – something he said Republicans could also do through their continuing control of the Senate. “You can’t do it simultaneously,” he said.

US midterm results: more diverse, more female and more progressive Show all 20 1 /20 US midterm results: more diverse, more female and more progressive US midterm results: more diverse, more female and more progressive Democratic candidate Ilhan Omar is celebrates with her husband's mother after she won a congress place, becoming the first Muslim woman to be elected into congress alongside Rashida Tlaib Reuters US midterm results: more diverse, more female and more progressive Democratic House candidate, from Kansas, Sharice Davids (left) and her mom Crystal celebrate after she won. Davids is the first lesbian Native American Congresswoman by beating Republican incumbent Kevin Yoder. Davids is one of several first-time female candidates that helped the Democratic Party takeover in the House of Representatives EPA US midterm results: more diverse, more female and more progressive Republican Marsha Blackburn celebrates after winning the race for senate in Tennessee. In doing so she became that state’s first female senator AP US midterm results: more diverse, more female and more progressive Supporters of Democratic House candidate Sharice Davids cheer and cry after learning she won EPA US midterm results: more diverse, more female and more progressive Ayanna Pressley beaome Massachusetts’ first black congresswoman by defeating 10-term Republican Michael Capuano AFP/Getty US midterm results: more diverse, more female and more progressive Republican candidate Young Kim has become the first Korean-American woman elected to Congress AP US midterm results: more diverse, more female and more progressive Democrat Jared Polis won his seat and became the US’s first ever openly gay governor AAron Ontiveroz/The Denver Post via AP US midterm results: more diverse, more female and more progressive Jean Kasselman (left) and Teresa Booker, supporters of Democratic candidate for Kansas' 3rd Congressional District Sharice Davids, react to election results Getty US midterm results: more diverse, more female and more progressive Republican Kristi Noem hugs a supporter after being announced as the new governor of South Dakota. Noem made history by being the first female governor of the state AP US midterm results: more diverse, more female and more progressive Gabierla Martinez and Cesar Delgado cheer on Democratic gubernatorial candidate Jared Polis REUTERS US midterm results: more diverse, more female and more progressive Alexandria Ocasio-Cortez became the youngest women ever elected to Congress, representing New York’s 14th congressional district AFP/Getty US midterm results: more diverse, more female and more progressive Democratic congressional candidate Rashida Tlaib celebrates with family and friends at her midterm election night party in Detroit after won and also became the nation’s first Muslim woman to congress alongside Ilhan Omar who was also elected Reuters US midterm results: more diverse, more female and more progressive Supporters of Democratic candidate for Kansas' 3rd Congressional District Sharice Davids react to election results Getty US midterm results: more diverse, more female and more progressive Already having become the first Native American woman to chair a state political party, Deb Haaland has now become the joint-first Native American woman to be elected to congress, alongside Sharice Davids Reuters US midterm results: more diverse, more female and more progressive Supporters of Alexandria Ocasio-Cortez cheer during her election night party in the Queens Borough AFP/Getty US midterm results: more diverse, more female and more progressive Young Kim hugs her son Alvin after she won a seat in congress AP US midterm results: more diverse, more female and more progressive Supporters of Alexandria Ocasio-Cortez cheer AFP/Getty Images US midterm results: more diverse, more female and more progressive Asma Mohammed and Ashley Fairbanks celebrate as results come in at Democratic congressional candidate Ilhan Omar's election night headquarters AP US midterm results: more diverse, more female and more progressive Democrat Deb Haaland hugs a voter REUTERS US midterm results: more diverse, more female and more progressive Supporters of Democratic House candidate from Kansas Sharice Davids cheer and cry after learning she won her race EPA

He added: ”They can play that game, but we can play it better. All you’re going to do is end up in back and forth and back and forth, and two years is going to go up and we won’t have done a thing.”

The president spoke the morning after a day in which the political power structure shifted sharply in the US, Democrats winning 26 House seats to take control of the lower chamber for the first time since 2010. Even if Democrats opt not to push for impeachment hearings, they could hold a endless hearing, subpoena members of the government and act at a block to many of his policy ambitions.

Republicans managed to gain two seats in the senate, something Mr Trump said had not healed for 100 years. After mocking those Republican candidates who lost their seats after refusing to embrace him on the campaign trail, among them congresswoman Barbara Comstock of Virginia, Mr Trump claimed the gains in the Senate outweighed the loss of the House – a view few pundits would share.

What do the midterms mean for Trump?

When the new congress is sworn in next January, Democrats will head House committees that can investigate the president’s tax returns, possible business conflicts of interest and any links between his 2016 election campaign and Russia.

The Associated Press said Mr Trump’s remarks came after Mitch McConnell, the Senate majority leader, said he had spoken with Ms Pelosi about how they might “find a way forward” in a divided congress next year.

The GOP “had a very good day” on Tuesday despite the House loss, Mr McConnell said. “I’m proud of what happened. The president was very helpful to us.”

On Tuesday night, Ms Pelosi told supporters: “Today is more than about Democrats and Republicans, it’s about restoring the Constitution’s checks and balances to the Trump administration.”

But on Wednesday, while Mr Trump was speaking at the White House, Ms Pelosi was speaking on Capitol Hill and pointing out the limitations to possible cooperation. For starters, she said, Democrats did not support Mr Trump’’s policy of separating migrant children from their families at the US-Mexico border.

She said the Democrats now had a “responsibility for oversight” when they take charge of the House in January. If elected speaker, Ms Pelosi said she would leave final decisions about that oversight to committees.

She would not answer a question about whether they will seek Mr Trump’s tax filings, but said committee requests for documents or hearings would not be be “scattershot”.