A man in a black suit raises his hands in front of a blue background. Behind him read the words "stronger, fairer, forward" in all capitalized white lettering.
New Jersey Gov. Phil Murphy greets supporters during an election night party in Asbury Park, N.J., early Wednesday, Nov. 3, 2021. Credit: Eduardo Munoz Alvarez / AP

TRENTON, N.J. — New Jersey Democratic Gov. Phil Murphy narrowly won reelection Wednesday, eking out a victory that spared Democrats the loss of a second gubernatorial seat.

He’s the state’s first Democratic governor to get a second straight term in 44 years, defeating Republican former Assembly member Jack Ciattarelli.

Ciattarelli waged a formidable campaign in the heavily Democratic New Jersey, his spending nearly equaling the governor’s and outpacing the GOP’s performance four years ago. But Murphy’s advantages, including 1 million more registered Democrats, proved too much for the Republican to overcome.

The victory gives Democrats a silver lining after GOP businessman Glenn Youngkin defeated Terry McAuliffe in Virginia’s gubernatorial race — exacerbating worries that President Joe Biden’s sagging approval ratings are hurting the party. This year’s elections were the first major tests of voter sentiment since Biden took office and pointed to a potentially painful year ahead for Democrats as they try to maintain thin majorities in Congress.

The closeness of the race has surprised experts, who watched public polls showing Murphy leading comfortably and looked to his party’s registration advantage of more than a million voters.

“If you asked anybody several months ago within the state, I think anyone would have predicted a high double digit landslide for Murphy,” said Ashley Koning, director of the Eagleton Center for Public Interest Polling at Rutgers University.

Murphy’s win also ends a more than three-decade-old trend of the party opposite the president’s winning in New Jersey’s off-year governor’s race. Voters came out in much higher rates for Ciattarelli this year than they did for his GOP predecessor in 2017.

The 64-year-old governor said he was acutely aware of the political trends, calling them an “animating” force for his reelection effort that spurred him to run as if he were 10 points behind.

Murphy built his campaign around the progressive accomplishments he signed into law — like a phased in $15 an hour minimum wage and paid sick leave along with taxes on the wealthy — and brought on Democratic allies, like progressive U.S. Sen. Bernie Sanders, to campaign for him.

With a Democrat-led Legislature, Murphy achieved most of the promises he made in his first run four years ago when he vied to succeed Republican Chris Christie. Paid sick leave, taxpayer-financed community college and some pre-K, tighter gun laws, expanded voting access, recreational marijuana, more state aid for schools and a fully funded public pension — all promised and all delivered during the first term. A proposal for a public bank to finance projects went unfulfilled.

On Wednesday morning, it was clear the results of the elections signaled bad omens for Democrats, with Republicans capturing the Virginia governor’s seat.

Headwinds facing Democrats, like President Joe Biden’s falling approval ratings and congressional Democrats’ struggles to enact their agenda didn’t factor heavily enough into some experts’ pre-election analysis, said Ben Dworkin, the director of Rowan University’s Institute for Public Policy & Citizenship. He counted himself among them.

A spokesperson for Ciattarelli said Wednesday that the campaign was focused on the vote count and said that a possible legal pursuit of a recount was on the table. Murphy also called Wednesday morning for every vote to be counted.

In the past four years, the Democratic party in the state expanded its registration advantage to 1 million more than Republicans and also picked up all but one of the state’s 12 House seats, though it lost one when a lawmaker defected to the GOP over the Democratic push to impeach Trump.

Ciattarelli is a former state Assembly member, serving until 2018. He’s the founder of a medical publishing company called Galen Publishing, and served as a local and county official in Somerset.

He walked a line between standing up for the moderate stances he had in the Legislature — like supporting Roe v. Wade — and appealing to Republicans who embraced Trump, particularly on cultural issues that have captured attention across the country

Mike Catalini, Associated Press. Associated Press writer Christina Paciolla contributed to this report.