Upper Hunter MP Michael Johnsen claimed victory on Sunday in the region's most marginal seat as the Nationals performed better than expected across the bush and helped the Berejiklian government return to power.
Mr Johnsen, who was at Muswellbrook races on Sunday, rode out the threat of bankruptcy and a preselection challenge last year to hold off a late charge from Labor's Melanie Dagg.
He was leading by 52.2 per cent to 47.8 per cent after preferences with 80 per cent of the vote counted in a seat which see-sawed between Labor and the Nationals in the first few hours of counting on Saturday night.
Ms Dagg, a 34-year-old Cessnock councillor, conceded to Mr Johnsen in a phone call at 5pm on Sunday. Mr Johnsen retained the 2.2 per cent margin he held in 2015 against Martin Rush.
Labor performed strongly in the Newcastle and Wallsend electorates, gaining swings of 11.8 and 4.9 per cent respectively, and easily held its five other Hunter seats, but it was a bitter weekend for the party.
Member for Newcastle Tim Crakanthorp lamented a bad week for Labor before the vote when Michael Daley performed poorly in the final leaders' debate and had to apologise for remarks last year about qualified Asian immigrants taking "our kids'" jobs.
Mr Crakanthorp said Mr Daley's "schools and hospitals before stadiums" campaign slogan had played well in the regions, but the final week had hurt the party.
"I think we were doing really well, and the last week we didn't do well," he said.
"I think that reflected at the polls ... in that last week, when he got on to other topics, he didn't do well, and the debate wasn't great."
The Coalition had secured 46 seats by Sunday afternoon, one short of an absolute parliamentary majority, and was leading in two of the three seats still regarded as on a knife's edge.
Labor secured only 33.2 per cent of the primary vote, about three per cent below predictions in pre-election surveys and well short of what was required to form a minority government.
Mr Daley said on Saturday night that he wanted to stay on as leader, but Kogarah MP Chris Minns said on Sunday that he would "not rule out" a challenge if he held on to his seat.
Mr Crakanthorp was noncommittal on Sunday about whether he supported Mr Daley.
"I haven't really thought about it, to be honest. I'm still trying to get through the results. I'm sure in due course that will be something that is front and foremost, but just not today."
Former Newcastle MP Jodi McKay, now member for Strathfield and Shadow Transport Minister, has been mentioned as a possible replacement for Mr Daley.
She did not respond to requests for an interview on Sunday.
Ms Dagg was a slight favourite with bookmakers to wrest Upper Hunter away from the Nationals for the first time in history, but Mr Johnsen defied the odds by dominating many of the outlying voting booths.
Labor was a clear winner in the major town centres of Singleton and Muswellbrook and gained preferences from Shooters, Fishers and Farmers candidate Lee Watts (22 per cent), but it was not enough.
The Coalition might have performed above expectations, but their performance in the Lower Hunter, and especially Newcastle, prompted departing parliamentary secretary for the Hunter Scot MacDonald to tell the Premier on Sunday that the government needed to "lift our game" in the region.
Mr Crakanthorp enjoyed the second biggest Labor swing in the state, based on three quarters of the vote count, and stretched his margin from 7 to 17 per cent.
The result in Port Stephens also provoked some soul-searching from the Liberal party after challenger Jaimie Abbott became involved in a Facebook trolling scandal two weeks before the vote.
Sitting MP Kate Washington enjoyed a 3 per cent swing to Labor.
Ms Berejiklian said last month that the Coalition would not win if it did not reclaim Port Stephens, but that prediction proved wide of the mark.
Perhaps the biggest winner in the Hunter will be Greg Piper, the independent Lake Macquarie MP who was shaping as a crucial ally for a Berejiklian minority government.
The Coalition may not need Mr Piper if it reaches a majority, but if it wins only the minimum of 47 seats, Ms Berejiklian may call on the 61-year-old to be Speaker of the House rather than taking one of the government's votes off the floor of Parliament.