Republican candidates swept key gubernatorial races across the country Tuesday, with Wisconsin Gov. Scott Walker fending off a Democratic challenger and a GOP businessman pulling off a stunning upset in deeply blue Maryland.

The gubernatorial contest between Maryland Lt. Gov. Anthony Brown and his Republican opponent, businessman Larry Hogan, shaped up to be a much tighter race than many had anticipated, leading up to Tuesday’s faceoff.

During his election night party, Hogan and his supporters at one point danced to Donna Summer’s “Last Dance” holding on to their iPhones in one hand and martinis in another, The Washington Post reported.

Brown conceded shortly after midnight.

The last time a Republican won a governor’s race in Maryland was in 2002 when Robert Ehrlich Jr., a popular congressman from the Baltimore County area defeated Lt. Gov. Kathleen Kennedy Townsend.

In Wisconsin, Walker won his re-election by beating Democratic challenger Mary Burke in what was billed from the start as a nail-biter of a race for the GOP. The victory boosts Walker's presidential prospects in 2016, since it would have been difficult to seek national office if he hadn't been able to win his own state.

The latest headlines on the 2016 elections from the biggest name in politics. See Latest Coverage →

Walker’s win is big for the GOP since many polls had him slipping with voters in advance of Tuesday’s election.

Two years ago, Walker was able to survive an attempted recall.

“I’m an optimist,” he said during his victory speech Tuesday. "I believe here in Wisconsin and in America we want to be for something and not against something. But you know what? That's the difference between Washington and Wisconsin. They're all against something. We're for something."

In Illinois, GOP businessman Bruce Rauner ousted Gov. Pat Quinn, denying him a second full term. 

Besides Walker, other GOP governors held on, including Sam Brownback in Kansas, Rick Scott in Florida, and Rick Snyder in Michigan. 

In another talked-about race, Republican Greg Abbott has been elected as the newest Texas governor in a decisive victory over Democrat Wendy Davis.

Davis, once the darling of pro-choice liberals, ended up running what many in both parties regarded as a lackluster campaign. Davis made national headlines following a 13-hour filibuster over new Texas abortion restrictions in 2013.

Abbott takes the reins from Gov. Rick Perry, the longest-serving governor in the state’s history. Perry, who was governor for 14 years, has hinted at a 2016 presidential run.

Republican incumbents also won in Maine, Oregon and Oklahoma, where GOP Gov. Dallin successfully turned back a challenge from opponent Joe Dorman.

It wasn’t all bad for Democrats. In Colorado, Democratic Gov. John Hickenlooper was projected the winner of his tight re-election race on Wednesday. Republican Tom Foley said Wednesday that he has lost the race for Connecticut governor to incumbent Dannel P. Malloy. The party also was able to take Pennsylvania’s marquee governor’s race Tuesday night, when challenger Tom Wolf knocked off sitting GOP Gov. Tom Corbett.

Corbett is the first governor to lose a re-election bid since the state Constitution was amended in 1968 to allow governors to succeed themselves.

While Wolf was able to consistently hold on to double-digit leads in polls leading up to Tuesday's race, Corbett was able to gain some ground in recent weeks.

Wolf and Corbett shook hands and courted voters during the final hours of the whirlwind campaign – one that smashed the state’s previous spending record.

Governorships in 36 states were up for grabs Tuesday, with polls showing more than a third of those races as being too close to call up until the polls were closed.

Republicans want to continue their gubernatorial advantage in the midterm elections and are defending more than 60 percent of governors’ seats on the ballot this year. Nine of the 19 states where GOP governors are running in tight re-elections are states that voted for President Obama in 2008 and 2012.

Ohio GOP Gov. John Kasich, regarded by some as a presidential hopeful in 2016, defeated Democratic challenger Ed Fitzgerald, a county executive.

Democrats once had high hopes for ousting Kasich, who pushed through a law cutting the collective bargaining powers of unions, only to see that law rolled back by a state referendum.

Fitzgerald’s campaign fizzled, however, when it was revealed that police had found him parked in a vacant lot at 4:30 a.m. with a woman who was not his wife – and that he lacked a valid driver’s license.

Kasich ran on his record of job creation in the wake of a punishing recession and his efforts to rein in Ohio government spending and cut taxes.

In Maine, Republican incumbent Paul LePage was re-elected, beating out challenger Mike Michaud, a six-term congressman.

In South Carolina, GOP Gov. Nikki Haley won re-election in a race that pitted her against Democratic challenger Vincent Sheheen.