WASHINGTON - After a stinging voters' rebuke, President Barack Obama has pledged to work with Republican leaders, the day after a historic electoral wave brought Republican control of the Senate and the opposition party's largest majority in the House of Representatives since 1930.

Obama did, however, say immigration reform was an inevitability, but the new Congress will be offered the opportunity to draft and pass a bill before he considers executive action. "Obviously Republicans had a good night," Obama said at his post-election news conference, adding, "What stands out to me is the American people sent a message." "They expect the people they elect to work as hard as they do. They expect us to focus on their ambitions, not ours."

In a sign of how he intends to govern under a new political order with ascendant Republican leaders, Obama renewed his commitment to act on his own to allow millions of undocumented immigrants to stay in the country.

His remarks were meant to put the vitriol of the campaign behind him — he responded to disaffected Americans by saying that “I hear you” and that his election mandate was to “get stuff done.” But his promised action on immigration underscored the profound partisan disagreements that persist in Washington.

Republicans quickly accused the president of reaching out to them with one hand while slapping them with the other. Senator Mitch McConnell of Kentucky, a Republican who is in line to be the majority leader in the new Congress, warned Obama in a news conference in Louisville not to act on immigration on his own.  “It’s like waving a red flag in front of a bull,” Mr. McConnell said.

The back-and-forth came on a grim day at the White House after an election that cost the Democrats the Senate and called into question the president’s capacity to accomplish much of substance in his remaining time in office.

For all the talk of cooperation, Obama confronted the reality that gridlock may still rule Washington, curtailing his legacy and frustrating his lofty ambitions.

Obama then put two new items on the agenda for the lame-duck Congress: A $6.2 billion emergency spending bill that would pay for efforts to fight Ebola and, in a turnabout from his previous stance, explicit congressional authorization for his war against the Islamic State.

For more than an hour, Obama spoke to reporters Wednesday from the East Room, a more formal venue than the briefing room. Responding to questions, Obama declined to analyze causes of the Democratic party's defeat.

"When it comes to the political analysis, that's your job," he told reporters. "But what is also true is I am the president of the United States, and I think, understandably, people are going to ask for greater accountability and more responsibility from me than from anyone else in this town. Appropriately so, and I welcome that."

Republicans said Obama's remarks showed he "didn't get the message of yesterday's election." Party Chairman Reince Priebus wondered, "Is he detached or in denial?"

Obama's comments came  after Sen. McConnell's Tuesday's victory speech in which he  outlined his agenda to reporters: trade deals, tax reform and changes to unpopular provisions of the Affordable Care Act (Obamacare). But McConnell also repeatedly noted that Obama's veto pen was a powerful tool.

Obama, never using the word "veto," said at the press conference: "Congress will pass some bills I cannot sign. I'm pretty sure I will take some actions that some in Congress will not like. That's natural. That's our how democracy works." Obama and McConnell spoke by phone Wednesday. McConnell called it a "good discussion." Obama said he congratulated McConnell and appreciated his words about working together.

Obama even offered his trademark alcoholic olive branch. "I would enjoy having some Kentucky bourbon with Mitch McConnell," he said.

At 53, and with his hair noticeably grayer than 2010, Obama seemed more energetic than mournful. He purported to enjoy the give-and-take with reporters, saying, "I missed you guys. We haven't done this in a while."