Donald Trump has threatened a “warlike” response if his political opponents investigate him after a bruising night at the polls in which he lost control of a crucial arm of the US government.

CNN's Jim Acosta has White House pass revoked after Trump confrontation Read more

In their first nationwide verdict since Trump won the presidency in 2016, Americans offered a split decision, with Democrats claiming a majority in the House of Representatives – including record numbers of women and people of colour – while Republicans expanded control of the Senate.

The result hands Democrats powers to block Trump’s legislative agenda – for example his wall on the Mexican border – and to seek his long-concealed tax returns, investigate possible conflicts of interest in his business empire and dig into any evidence of collusion between him and Russia in the 2016 election. They can demand documents and issue subpoenas if needed.

At a combative, rambling and often wild press conference on Wednesday, Trump offered an olive branch for “a beautiful bipartisan-type situation” but also issued a warning. “Now we have a much easier path because the Democrats will come to us with a plan for infrastructure, a plan for health care, a plan for whatever they’re looking at, and we’ll negotiate,” he said.

But if Democrats launch investigations against him, Trump warned, his attitude will be different. “If they do that, then it’s just – all it is is a warlike posture.”

He added: “They can play that game, but we can play it better, because we have a thing called the United States Senate and a lot of questionable things were done between leaks of classified information and many other elements that should not have taken place. I could see it being extremely good for me politically because I think I’m better at that game than they are, actually, but we’ll find out.”

Trump repeated his denial of collusion with Russia and insisted that he would not release his tax returns, claiming: “Look, as I’ve told you, they’re under audit. They’re extremely complex. People wouldn’t understand them.”

Tuesday’s election outcome fell short of the repudiation of the president that millions in America, and around the world, had yearned for after two years of tumult, offensiveness and shattering of democratic norms. Trump’s bellicose campaign, widely condemned for appeals to overt racism, actually increased support for Republicans in some strongholds.

Play Video 1:34 White House accuses CNN’s Jim Acosta of 'placing his hands' on young 'intern' – video

“I thought it was very close to a complete victory,” he bragged on Wednesday, highlighting projected victories in states such as Florida and Georgia, where former president Barack Obama and media star Oprah Winfrey campaigned for Democrats. He also openly mocked Republicans who refused his help during the campaign. “Mia Love gave me no love, and she lost. Too bad. Sorry about that, Mia.”

Trump looked tired at first but became fired up as he clashed angrily with reporters, barking at several to sit down. He unleashed a tirade at CNN correspondent Jim Acosta, declaring: “CNN should be ashamed of themselves having you working for them. You are rude, terrible person.” An aide tried to grab the microphone from Acosta’s hand. Trump stepped away from the podium for a few moments before resuming.

Asked by an African American reporter about his claim to be a nationalist, Trump retorted: “That’s a racist question.” He also made a claim that will make his critics’ jaws drop: “I think I am a great moral leader and I love our country.”

But he said little to heal the nation’s polarisation. Analysts forecast two years of partisan gridlock and rancour on Capitol Hill. The election outcome only seemed likely to deepen the nation’s divisions across lines of gender, race and education. Democratic successes were fuelled by women, people of colour, young people and university graduates. The typical Republican voter was an older, white male and less likely to have a degree.

In the 435-member House, Democrats were heading for a gain of around 30 seats, beyond the 23 they needed to claim their first majority in eight years. The road to a majority ran through two dozen suburban districts that Hillary Clinton won against Trump in 2016. Democrats flipped seats in suburban districts outside Washington, Philadelphia, Miami, Chicago and Denver. They also reclaimed a handful of blue collar districts carried by both former president Barack Obama and Trump.

Play Video 2:54 The trailblazing candidates who broke barriers in the 2018 midterm elections – video

Nearly two years after women marched in the streets of Washington and other cities in defiance of Trump’s inauguration, they proved decisive at the ballot box. Preliminary exit polls showed that women voted for House Democrats by a 21-point margin, 60% to 39%, while men were closely divided (50% for Republicans, 48% for Democrats).

In the final weeks of the campaign, Trump warned of an “invasion” by a migrant caravan that would spread violent crime and drugs, even though it was hundreds of miles from the US border. Democrats focused on issues such as healthcare maintaining insurance protections for people with pre-existing medical conditions. They also delivered a symbolic rebuke to the president: for the first time in US history, the majority of a major party’s candidates were not white men.

The midterms were on course to send at least a hundred women to the House, breaking the current record of 84. In New York, 29-year-old Alexandria Ocasio-Cortez, a Latina, became the youngest women elected to Congerss. In Kansas, Democrat Sharice Davids beat a Republican incumbent to become the first gay Native American woman elected to the House. Tennessee elected its first female senator and the House gained its first two Muslim women.

Ayanna Pressley, who became the first black woman elected to Congress from Massachusetts, told supporters: “Now, listen, I know for a fact none of us ran to make history, we ran to make change. However, the historical significance of this evening is not lost on me.”

Nancy Pelosi, 78, who in 2007 became the first female speaker in US history, looked set to regain the gavel. She spoke of “a new day in America”, telling supporters: “Today is more than about Democrats and Republicans, it’s about restoring the constitution’s checks and balances to the Trump administration.”

But even as they celebrated revival after the nadir of 2016, many on the left felt a sense of anti-climax. In Florida, Trump-backed Republican Ron DeSantis, accused of weaponising racism for his own benefit, ended Democrat Andrew Gillum’s bid to become the state’s first African American governor. The party also lost Senate battlegrounds in Indiana, Missouri, Tennessee, North Dakota and Texas, where Republican Ted Cruz saw off an insurgent challenge from rising Democratic star Beto O’Rourke, who had raised a record $70m.

Republican turnout appeared to have been boosted by the row over Brett Kavanaugh, who was confirmed to the supreme court despite allegations of sexual assault and bitter political fight. They also scored a major victory in Ohio’s governor race, where Mike DeWine, the state attorney general, defeated Democrat Richard Cordray, who served as the first director of the US Consumer Financial Protection Bureau.

The night was therefore not a disaster for Trump, whose approval rating is just 40%, according to Gallup. A president’s party has traditionally suffered deep losses in his first midterm election. Both Obama’s and Bill Clinton’s approval ratings were five percentage points higher, and both suffered midterm losses of 63 and 54 House seats respectively.