The jubilant leader of the Republicans in the US Senate, Mitch McConnell, on Wednesday challenged Barack Obama to find common ground with Congress after the Democrats’ crushing defeat in the US midterm elections threatened to test the limits of the president’s power during his final two years in office.

In an ambitious speech hours after his party gained control of both houses of Congress, McConnell warned Obama not to “poison the well” by pushing forward with unilateral action on immigration reform, and promised to introduce legislation that would permit the long-delayed Keystone XL pipeline, bitterly opposed by environmentalists.

Obama, meanwhile, conceded that the electorate had sent the Democrats a message, inflicting a rout on the party that was far worse than expected.

Speaking in Louisville, after defeating a well-funded challenge from Kentucky secretary of state Alison Lundergan Grimes, McConnell called on Obama to take his lead from previous administrations that had to deal with a Congress dominated by opposing parties. “Reagan and Clinton are good examples of accepting the government you have rather than fantasising about the government you wish you had,” said an unusually joyous McConnell. “I am hoping [Obama] will decide to move to the centre.”

Taking questions at a more downbeat White house press conference on his election defeat, Obama made similar, if equally familiar, calls for bipartisan deals, citing pet projects such as on trade liberalisation, tax reform and infrastructure investment. He also called for progress in areas that may prove more controversial: authorisation on military force in Iraq and Syria, extra funding for an expanded Ebola response and the passage of a new budget.

Obama acknowledged that Republicans had a “good night” after the elections, and sounded a conciliatory note. “I have a unique responsibility to try to make this town work,” said the president. “To everyone who voted: I hear you.”

Facebook Twitter Pinterest US president Barack Obama pauses while speaking during a press conference in the East Room of the White House. Photograph: Brendan Smialowski/AFP/Getty Images

Democrats woke up to the political equivalent of a pounding hangover on Wednesday after defeats more numerous and deeper than many had feared, while Republicans rode a wave of victories that gave them significant momentum going into the 2016 presidential elections.

Republicans gained seven Senate seats from Democrats, cementing the GOP’s power base on Capitol Hill. They were poised to take an eighth, Alaska, and if they win a runoff in Louisiana, Republicans would command a 54-vote majority in the Senate.

On a night of few positives for Democrats, Republicans also outperformed them in most of the 36 governors’ races, clinching victories in Democratic strongholds including Massachusetts, Maryland and Illinois.

“This is ugly,” one top Democrat involved in the party’s election strategy told the Guardian in the early hours of Wednesday morning. “It is so much worse than we expected.”

On the face of it, Obama and McConnell’s response to the results was to call for common ground. But both also made clear their desires to pursue policies they know are unacceptable to the other – a conflict that is likely to face its first test over immigration reform, where the president has promised Latino groups that he will take unilateral executive action to legalise many undocumented migrants in the absence of agreement from Congress.

McConnell fired a shot across Obama’s bows over the threat. “Choosing to do a lot of things unilaterally on immigration wold be a big mistake.” he said. “It’s like waving a red flag in front of a bull ... It poisons the well.”

More progress seems likely over the Keystone XL pipeline project, which Obama praised as “one small aspect of broader trend that I consider positive for the American people”. The Republican election gains could finally force a resolution of the proposed pipeline, six years after the Canadian company began work on the project, which would pump crude from the Alberta tar sands to refineries on the Texas Gulf coast and is a powerful symbol for Republicans and energy state Democrats. Opponents say the project would expand production of a very dirty fossil fuel and worsen climate change.

Facebook Twitter Pinterest A person takes a copy of a New York Post at a newstand in Grand Central Station in New York after the midterms. Photograph: Timothy A Clary/AFP/Getty Images

Obama could still veto Keystone as incompatible with his climate change agenda. Even with their electoral gains and support from conservative Democrats, the Republicans do not have the votes to override a presidential veto.

The Republican party chairman, Reince Priebus, told MSNBC he thought Obama would be forced to greenlight the pipeline. “I actually think the president will sign the bill on the Keystone pipeline because I think the pressure – he’s going to be boxed in on that, and I think it’s going to happen,” Priebus said.

As they engage in damage limitation, Democrats will in the next few days argue that their defeats in the House and Senate were expected and consistent with historical trends. Yet the scale of Tuesday’s Senate defeat, on a tide of support for Republicans that rippled across House and gubernatorial races, will be hard for them to play down.



The extent of the defeat will also be a cause for concern for Hillary Clinton, the heir-apparent for the Democratic presidential nomination, who, along with her husband, former president Bill Clinton, stumped for several of the party’s Senate candidates who lost badly.



The governor of New Jersey, Chris Christie, widely seen as a potential candidate for the party in the 2016 presidential elections, said he was delighted with the result and urged Obama to work with the new political reality in Washington. “The president took a beating last night, and the fact is, you’ve got to sit down then with the folks on the other side and say to them, ‘OK, let’s see what we can agree on together’,” he told ABC.