President Obama acknowledged Thursday that the executive actions he has been taking to work around an uncooperative Congress will go only so far in achieving his agenda, and said Democrats need to win control of the legislative branch to set the country on the right path in the final two years of his tenure.

The remarks at a fundraiser here were striking because Obama has released high-profile executive actions every few weeks as part of a “year of action” meant to bypass the Republicans who lead the House and who have refused to cede almost any legislative achievement to the president since taking control in 2010.

“Regardless of how hard I push, regardless of how many administrative actions I take, we’re not going to be able to go where we need to go, and can go, and should go unless I’ve got a Congress that’s willing to work with me,” Obama said at a fundraiser for the Democratic Congressional Campaign Committee.

The comments underscored that despite many congressional battles, Obama still has a largely unfinished agenda with his remaining time in the White House disappearing. While his first two years in office — when Democrats were in charge of Congress — were notable for a range of legislative achievements, legacy-defining action on issues such as climate change and the economy has eluded him since 2010.

After his reelection, Obama tried to nurture relationships with congressional Republicans. When that failed to produce legislative achievements, he turned to executive actions while holding out hope that Republicans would cooperate on certain policies such as an overhaul of immigration laws.

His comments Thursday suggested that while he is still open to compromise, Obama now believes that deals with Republicans, especially in the House, are unlikely and that Congress must return to full Democratic control for him to secure substantial achievements in the final two years of his presidency.

“In order for us not to simply play defense but actually go back on the offensive on behalf of the American people, on behalf of striving families all across this country, including right here in California, we’ve got to have folks like [House Minority Leader] Nancy Pelosi guiding the debate,” Obama said. “And the only way that happens is if we feel the same sense of urgency about midterms as we do about presidential elections.”

Obama was trying to remind the audience — already fervent supporters — that Democratic voters tend to sit out midterm elections more often than Republicans do. That’s because, he explained, they’re often young, minority or working-class, and so burdened by the preoccupations of daily life that they have little time for politics.

“Folks are busy,” he said. “They’ve got a lot of stuff going on.”

Obama expressed optimism about the election. He referred, as he had done the previous night, to Pelosi as the once and future speaker of the House. But nonpartisan projections are cause for much more pessimism in the White House.

Polls and forecasting models show Democrats locked in an extremely tight contest to retain control of the Senate and with almost no chance of capturing the House.

Earlier in the day, Josh Earnest, the principal deputy White House press secretary, said that Obama genuinely believes that Democrats can pull off a takeover of the House. That’s because, he said, Americans still strongly align with Democratic policies.

“On issue after issue, either a plurality or a majority of Americans side with Democrats,” he said. “The issues are on the side of Democrats in this election.”

Earnest said “the stakes are very high” in the elections and Obama is “committed to doing what he can to support Democrats.”