Updated

With Election Day 2017 in the rearview and no major victories for GOP candidates, Republicans are brushing themselves off and shifting focus toward the 2018 midterms – insisting the party is “better positioned” than ever.

But as Barack Obama learned in 2010, the first midterm for a new president can deliver an agenda-stalling power shift on Capitol Hill. President Trump still enjoys majorities in both chambers, and GOP leaders want to keep it that way, vowing to keep the House speaker's gavel out of Nancy Pelosi's hands even as she claims the "door is open" to flipping the House.

“We are seeing that voters across this country want to see things get done in Washington, and at the RNC we’re seeing record fundraising and support of President Trump and his agenda,” Republican National Committee Chairwoman Ronna McDaniel said on “America’s Newsroom” Wednesday morning.

“So as Republicans, we need to keep working on behalf of the American people and accomplish the things we ran on. ... And I think we’re better positioned than we’ve ever been for the midterms.”

“Tonight’s success is just the beginning."

— Tom Perez, DNC chairman

Tuesday night was undeniably a setback for the GOP -- and brought a badly needed pair of wins for Democrats in key gubernatorial races. Lt. Gov. Ralph Northam beat Republican Ed Gillespie in Virginia, and Phil Murphy easily beat GOP Lt. Gov. Kim Guadagno in New Jersey.

Democratic National Committee Chairman Tom Perez said Tuesday night that they won because "voters know that Democrats share their values of inclusion and opportunity," and stressed that the "new DNC" showed its commitment to "organizing for our values."

House Minority Leader Pelosi, D-Calif., claimed Wednesday the “door is open” to retaking the House. Senate Minority Leader Chuck Schumer, D-N.Y., said Tuesday “was a rejection” of Trump.

But McDaniel brushed off the losses, saying those are races Democrats typically win, in blue states that are “getting bluer and bluer.”

She reminded Democrats reading deep into the victories that “Republicans won five special [House] elections, including Utah last night.” McDaniel said Democrats would “try to create this big narrative,” but "they should have won Virginia and they should have won New Jersey."

Trump, meanwhile, blamed Gillespie himself for the loss in the Virginia, suggesting he should have embraced the Trump agenda more.

“Ed Gillespie worked hard but did not embrace me or what I stand for. Don’t forget, Republicans won 4 out of 4 House seats, and with the economy doing record numbers, we will continue to win, even bigger than before!” Trump tweeted from Seoul, South Korea on Tuesday night, just minutes after the gubernatorial race was called in Virginia for Northam.

The president repeatedly urged voters to support Gillespie leading up to Election Day, but the Republican nominee kept a certain distance from Trump throughout the campaign, even as he adopted some of the president’s tough immigration policies.

But while Gillespie tried to strike a balance in the swing state—the only southern state Trump lost in last year’s presidential election –Democrats worked hard to tie Gillespie to the president at every turn.

For his part, Northam did shift his stance on some policies like Confederate statues and immigration after he secured his candidacy following the primary, and even said he would work with Trump.

“Northam moved the needle by saying I’m going to work with this president,” McDaniel said Wednesday, adding that if there is “a playbook for Democrats, it’s to work with the president.”

Trump's political capital, though, may be determined in the coming weeks based on whether he and congressional Republicans can push through a tax reform package.

For now, it's unclear whether running against Trump is a winning strategy for Democrats.

For months, Democrats feverishly worked to make every local election a referendum on the president and lost a streak of House races doing so. In a Tuesday night tweet, Trump referred to those special elections in Kansas, Montana, Georgia and South Carolina – races Republicans swept.

But Republicans are gearing up for a big fight in 2018 — with multiple GOP lawmakers in both the House and the Senate slated to retire when their terms end.

Just this week, GOP Reps. Frank LoBiondo, R-N.J., and Ted Poe, R-Texas, announced their retirements, adding to the list of Republican lawmakers bowing out after 2018, including Reps. Dave Trott, R-Mich.; Charlie Dent, R-Pa.; and Dave Reichert, R-Wash.; and Sens. Jeff Flake, R-Ariz., and Bob Corker, R-Tenn.

Despite the retirements, Democrats need to mount a wave next fall to win the necessary 24 seats and retake the House. In the Senate, Democrats need three pick-ups to flip the chamber.

"We’ve demonstrated we can win tough, competitive races, and as you look into the next year, the major takeaway from last night is it is important for Republicans to pass major legislative items,” National Republican Congressional Committee press secretary Jesse Hunt told Fox News on Wednesday. “Voters are going to have a different choice next year that wasn’t necessarily applicable last night, and that is -- do you want Nancy Pelosi as House speaker? I think Republicans will have success because the prospect of Nancy Pelosi becoming speaker again is something voters will reject overwhelmingly.”

It's unclear whether Tuesday's victories will turn things around, but the Democratic National Committee has struggled in fundraising all year compared with McDaniel's RNC.

The "new DNC" has promised to deliver victories.

“Tonight’s success is just the beginning," Perez promised Tuesday night. "We believe that every zip code counts, and we will organize 365 days a year against a Republican Party that always caters to Wall Street instead of Main Street. That’s how we will keep winning elections from the school board to the Oval Office.”