Democrat New Jersey Gov. Phil Murphy will hang onto his job by a thread Wednesday after a nail-biter of an election against GOP candidate Jack Ciattarelli. 

The Associated Press called the race for the incumbent Wednesday after Ciattarelli carried a lead of just over 1,000 votes overnight. But the remaining ballots allowed Murphy to close that gap and remain the governor of the Garden State, despite a political environment that led to several major upsets for Republicans Tuesday, including in the Virginia governor's race.  

But the move to call the race was met with resistance from the Ciattarelli campaign, who argued it was "irresponsible" to make the call so quickly.

Gov. Phil Murphy speaks at an early vote rally at Weequahic Park, Saturday, Oct. 23, 2021, in Newark, N.J. (AP Photo/Stefan Jeremiah)

Gov. Phil Murphy speaks at an early vote rally at Weequahic Park, Saturday, Oct. 23, 2021, in Newark, N.J. (AP Photo/Stefan Jeremiah) (AP Photo/Stefan Jeremiah)

CLICK HERE TO GET THE FOX NEWS APP 

Murphy's narrow win comes despite polls indicating the incumbent was in for a comfortable victory in the state he won by over 14 points during his first run in 2017. President Biden also won the state easily just one year ago, defeating Donald Trump by nearly 16 points. 

The incumbent faced several challenges throughout the race, including criticism of his decision to order nursing homes to readmit patients who were recovering from COVID-19, a move some critics said led to unnecessary loss of life. 

Murphy was criticized for a failure to take the issue of New Jersey's nation-high property taxes seriously during his first term, dismissing the issue while saying that if "you’re a one-issue voter and tax rate is your issue, we’re probably not your state."

In remarks late Tuesday as the election hung in the balance, Murphy promised to spend the next four years helping people in the state "achieve their American dream."

"For almost four years now, our focus has not been on trying to do more for those who already have much, but to do much for those in the middle and at the bottom so that they have more opportunity," Murphy said in his election night remarks. "Our mission has been simple to build a state where every child, regardless of race or gender, creed or zip code, has the opportunity to live out their hopes and achieve their American dream."

Fox News' Zack Daniels contributed to this report.