Donald Trump was buoyed by victories that added to the Republican majority in the US Senate

US President Donald Trump on Wednesday vowed to jettison any attempt at bipartisanship and fight back if the new Democratic majority in the U.S. House of Representatives used its powers to press investigations into his administration.

Trump, speaking during a combative news conference in which he tangled with reporters and trumpeted his role in Republican gains in Tuesday's midterm congressional elections, warned he would adopt a "warlike posture" if Democrats investigated him.

Democrats will now head House committees that can probe the president's tax returns, which he has refused to turn over, possible business conflicts of interest and any links between his 2016 election campaign and Russia, a matter being investigated by U.S. Special Counsel Robert Mueller.

Trump was buoyed by victories that added to the Republican majority in the U.S. Senate, telling reporters at the White House that the gains outweighed the Democrats' takeover of the House. He added that he was willing to work with Democrats on key priorities but felt any investigations of his administration would hurt prospects for bipartisanship.

"They can play that game, but we can play it better," Trump said of the possibility of Democratic investigations. "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 divided power in Congress combined with Trump's expansive view of executive power could herald even deeper political polarization and legislative gridlock in Washington.

There may be some room, however, for Trump and Democrats to work together on issues with bipartisan support such as a package to improve infrastructure, protections against prescription drug price increases and in the push to rebalance trade with China.

"It really could be a beautiful bipartisan situation," Trump said.

He said Nancy Pelosi, who could be the next speaker of the House, had expressed to him in a phone call a desire to work together. With Democrats mulling whether to stick with Pelosi, who was speaker when the party last controlled the House, or go in a new direction, Trump wrote in a tweet earlier that she deserves to be chosen for the position.

Pelosi, at a news conference on Capitol Hill, said Democrats would be willing to work with Trump where possible, but added, "We have a constitutional responsibility to have oversight."

"I don't think we'll have any scattershot freelancing in terms of this. We will have a responsibility to honour our oversight responsibilities and that's the path we will go down. We again (will) try to unify our country," she said.

The Democrats fell short of a tidal wave of voter support that would have won them control of both chambers of Congress. But in the 435-member House, the party was headed for a gain of around 30 seats, beyond the 23 they needed to claim their first majority in eight years.

A Senate majority would have allowed Democrats to apply even firmer brakes on Trump's policy agenda and given them the ability to block any future Supreme Court nominees.

House Democrats could force Trump to scale back his legislative ambitions, possibly dooming his promises to fund a border wall with Mexico and pass a second major tax-cut package. Legislators could also demand more transparency from Trump as he negotiates new trade deals with Japan and the European Union.

"Today is more than about Democrats and Republicans; it's about restoring the Constitution's checks and balances to the Trump administration," Pelosi told supporters at a victory party Tuesday night.

Trump also mocked Republican candidates who had refused to back his policies and ultimately lost their races, such as U.S. Representative Barbara Comstock of Virginia.

"They did very poorly. I'm not sure that I should be happy or sad but I feel just fine about it," he said.

GRIDLOCK?

U.S. stocks jumped on Wednesday as investors, who often favour Washington gridlock because it preserves the status quo and reduces uncertainty, bought back into a market that had its worst month in seven years in October.

The Dow Jones Industrial Average <.DJI> had gained more than 1.6 percent by midafternoon while the broad-based S&P 500 index <.SPX> was up 1.6 percent. The dollar <.DXY> was slightly weaker against a basket of currencies.

A Democrat-controlled House could hamper Trump's attempts to further his pro-business agenda, fuelling uncertainty about his administration. His corporate tax cuts and the deregulation that have played a large hand in the U.S. stock market's rally since the 2016 election, however, are likely to remain untouched.

"With the Democrats taking over the House, we will now have to see what gridlock in Congress means for policy. As for the market impact, a split Congress has historically been bullish for equities and we expect to see the same pattern again," said Torsten Slok, chief international economist for Deutsche Bank.

Democrats will use their new majority to reverse what they see as a hands-off approach by Republicans toward Trump's foreign policy, and push for tougher dealings with Russia, Saudi Arabia and North Korea.

Foreign policy has been an area that Trump has approached in a very personal way, sometimes antagonizing allies such as Canada while making what critics see as unduly warm overtures to traditional U.S. rivals or foes.

Tom Perez, chairman of the Democratic National Committee, said Democrats could work with Republicans to produce a long-awaited bill to upgrade the nation's roads, bridges and airports.

"Of course, we want to work in a bipartisan fashion. I think we can get an infrastructure bill," he said.

Trump had hardened his rhetoric in recent weeks on issues that appealed to his conservative core supporters. He threw himself into the campaign, issuing warnings about a caravan of Latin American migrants headed through Mexico to the U.S. border and condemnations of liberal American "mobs" he says oppose him.

DEMOCRATIC PROBES

Every seat in the House was up for grabs on Tuesday and opinion polls had pointed to the Democratic gains. The party with the presidency often loses House seats in midterm elections.

The Republicans had an advantage in Senate races because elections were held for only 35 seats in the 100-member chamber and many of them were in states that often lean Republican.

Republicans built on their slim Senate majority by several seats and ousted at least three incumbent Democrats: Joe Donnelly in Indiana, Heidi Heitkamp in North Dakota and Claire McCaskill in Missouri.

In Florida, Democratic Senator Bill Nelson was trailing his Republican rival, Governor Rick Scott, by a slim margin, with the possibility of a recount looming. Republican Martha McSally was leading Democrat Kyrsten Sinema in the U.S. Senate race in Arizona with some votes still to be counted.

The Republican gains are sure to bolster the party's efforts to get conservative federal judges through confirmation proceedings. In the 36 gubernatorial contests, Democrats won in several states that supported Trump in 2016 but lost high-profile races in Florida and Ohio.

Democrats could infuriate Trump by launching another congressional investigation into allegations of Russian interference on his behalf in 2016. Moscow denies meddling and Trump, calling the Mueller probe a witch hunt, denies any collusion.

Trump said he could fire Mueller if he wanted but was hesitant to take that step. "I could fire everybody right now, but I don't want to stop it, because politically I don't like stopping it," he said.