Democrat Phil Murphy was elected governor of New Jersey on Nov. 7. Murphy beat Republican Lieutenant Governor Kim Guadagno. (Reuters)

Democrats took back the governor’s seat in New Jersey as first-time candidate Phil Murphy defeated Lt. Gov. Kim Guadagno (R), capping a tumultuous eight years of term-limited Republican Gov. Chris Christie’s leading the state.

The party also cemented its 12-year control of both houses of the state legislature, putting Democrats back in control of the entire state.

The race was a bright spot for Democrats, who also won a key governor’s race in Virginia, where Lt. Gov. Ralph Northam defeated Republican Ed Gillespie, as the party tries to compete in as many as a dozen potentially competitive governor’s races in 2018.

Murphy’s win wasn’t an unexpected one. The former banker and Democratic Party official had been leading Guadagno by double digits in the polls for most of the race.

“You helped send a message that we are united,” Murphy told supporters in an email, “and that together we’ll end the failed status quo in Trenton by creating a stronger, fairer economy that works for every New Jersey family.”

In a state that hasn’t voted for a Republican for president in almost 30 years, Guadagno struggled to get out from the shadow of two controversial Republicans: President Trump and her boss for the past eight years, Christie.

Christie, whose approval rating has hovered around 15 percent over the past few months, has been plagued by scandals and public-relations missteps during his two terms.

In 2016, former Christie allies were convicted in the “Bridgegate” scandal, in which they conspired to cause traffic jams near the George Washington Bridge to punish a local mayor who refused to support the governor’s reelection bid. Christie was ridiculed in July after photos surfaced of the governor and his family sitting on a public beach he ordered closed amid a government shutdown.

“Most New Jerseyians are just not willing to give a Republican a chance of being governor right now,” said Brigid Harrison, a political-science professor at Montclair State University. “And that is the Christie legacy.”

Murphy veered to the left during the campaign and never looked back. He endorsed raising the minimum wage and embraced union rights, paid sick leave and tax hikes.

It’s almost as if he was taking lessons from presidential nominee Hillary Clinton’s 14-point win in New Jersey in 2016, Harrison said. “His policies have been remarkably progressive,” she said. “He is an interesting lesson for the Democratic Party about the possibilities of transformative policies in the post-Clinton era.”

Republicans say their impressively long hold on the governorship in blue New Jersey as well as the simple presence of a Republican president in the White House were both major head winds for them. “You have a race that has many challenges for Republicans at the top of the ticket,” said Matt Walter, director of the Republican State Legislative Committee, a few days before the election.

Virginia’s gubernatorial race has traditionally been considered a bellwether for how the parties perform in the next year’s congressional elections. But New Jersey can also indicate a party’s health. When Christie won the seat in 2009, it was seen as the first blow to the Obama era. Democrats say winning this seat back gives their party huge momentum for next year, when they hope to put a major dent in Republicans’ dominance of state politics.

Murphy’s win makes New Jersey the seventh state entirely controlled by Democrats, compared with 26 states that have a Republican governor and legislature. New Jersey Democrats could set a record for longest majority control of a state legislature.

Democrats say the win in New Jersey can set them up to take open governor’s seats in 2018 that were held by Republicans for the past two terms, such as Michigan, Ohio, Kansas, Florida, New Mexico and Maine.

But even once Murphy is sworn in, Republicans will still control 33 governorships, a near all-time high for the party.

New Jersey politics could come back into the spotlight in the next few days if Sen. Robert Menendez (D) is found guilty in a federal corruption trial, in which jurors are deliberating. If convicted, Menendez could face pressure to resign before Christie leaves office in January, which would let Christie appoint the senator’s replacement and potentially shift the balance of power in the Senate by giving Republicans a greater majority.