WASHINGTON — Two things were clear long before the votes were counted on Tuesday night: President Obama would face a Congress with more Republicans for his final two years in office, and the results would be seen as a repudiation of his leadership.

But that was not the way Mr. Obama saw it. The electoral map was stacked against him, he argued, making Democrats underdogs from the start. And his own party kept him off the trail, meaning he never really got the chance to make his case. “You’re in the Final Four,” as one aide put it, “and you’re on the bench with a walking boot and you don’t get to play.”

The Republican capture of the Senate culminated a season of discontent for the president — and may yet open a period of even deeper frustration. Sagging in the polls and unwelcome in most competitive races across the country, Mr. Obama bristled as the last campaign that would influence his presidency played out while he sat largely on the sidelines. He privately complained that it should not be a judgment on him. “He doesn’t feel repudiated,” the aide said Tuesday night.

But the Republican tide was stronger than projected, sweeping away Democrats even in some of those few blue states where the president did campaign. Mr. Obama now faces a daunting challenge in reasserting his relevance in a capital where he will be perceived as a lame duck. If the hope-and-change phase of his presidency is long over, he wants at least to produce a period of progress and consolidation to complete his time in the White House.