An overjoyed Gladys Berejiklian says her re-elected government will “continue to work our guts out” after NSW voters gifted the Coalition a third term in office.

Ms Berejiklian is the first woman to be elected premier, and said she was proud the state would vote in a woman and “someone with a long surname”.

Her deputy, Dominic Perrottet, said the moment would empower women.

“It send a great message and as a father of four young girls … I think that’s fantastic,” he said.

“I think it’s going to provide inspiration to many young girls around the state.”

Ms Berejiklian’s win represents a better-than-expected result for the Coalition, after polls forecast a neck-and-neck race but Labor failed to make gains in key seats.

But ABC election analyst Antony Green said Ms Berejiklian could still face minority Government.

Welcomed to the Liberals’ election-night function by shrieks, hugs and chants of “four more years”, Ms Bereijklian said she was not yet prepared to concede a single seat.

“For the first time in nearly half a century, the people of New South Wales have seen fit to give us our third term in government.”

Late on Saturday night, ABC election analyst Antony Green said the Coalition appeared to have won 46 of the 47 it needed for a majority in the Lower House.

Ms Berejiklian said regardless of whether she led a majority or minority government, the Coalition would work closely with the minor parties.

Earlier, NSW Labor leader Michael Daley addressed crowds at Labor’s election reception at the Coogee Bay Hotel, where he conceded defeat.

He said it was his intention to remain the leader of the party despite the “disappointing result”.

“Sometimes we win them, and sometimes we lose them. But one thing never changes: our passion, our belief and our mission to make New South Wales and Australia a better place, and that is what we will continue to do.”

Mr Daley said the results were not positive for either major party, after minor parties enjoyed an increase in votes.

“We have more work to do if we’re not going to see a continual erosion of public confidence in the political system”.

In the Upper House One Nation, it appeared likely outspoken former federal Labor leader Mark Latham would claim an Upper House seat for the party.

Berejiklian’s a ‘great advertisement’ for Liberals: PM

Green said the count was the “slowest he had ever seen” and he was “inclined to be cautious” as to whether the Coalition would be returned in majority or minority.

He said the Coalition had so far fared “much better” than opinion polls suggested.

This is Ms Berejiklian’s first election as premier. She was promoted into the position by her party after previous leader Mike Baird resigned in 2017.

The Liberal Party has so far managed to retain a significant number of its seats, despite an overall swing of 4.4 per cent against it.

Prime Minister Scott Morrison addressed crowds at Liberal headquarters in Sydney CBD, calling it a “courageous result”.

“To Gladys and Dominic [Perrottet] and all of the team here in New South Wales, thank you for the great government you’re delivering … and thank you for the great advertisement you’ve been for the Liberal Party.”

The Nationals, however, did not fare as well, and the seat of Barwon has been lost to the Shooters, Fishers and Farmers Party (SFF), Green said.

The marginal Nationals seat of Murray was also lost to the SFF.

The swing against the Nationals in the bush was an issue of that party’s own making after the state’s regions were “abandoned and ignored”, SFF candidate Roy Butler said.

Mr Perrottet said the early indications of a Coalition victory were the result of a strong campaign run by the Premier.

“This is looking like a very strong result for the Coalition in the circumstances of some of the challenges that we faced,” he said.

“I think what Gladys has been able to successfully do in this election is talk about the other things — the significant infrastructure that we’re building across the state and the importance of that.”

Daley’s migration comments prove costly

Labor MP Jodi McKay refused to declare it a “bad night” for Labor and pointed to the fact that the Coalition has possibly lost six seats.

“It’s a disappointing result for us, but I also think this is not a victory that the government can crow about when you look at the seats that they are likely to lose,” she said.

In Sydney, Labor overturned a margin of 2.9 per cent to win the seat of Coogee off the Liberals, which Ms McKay described as “great news”.

But in East Hills — Sydney’s most marginal electorate — Labor was unable to get over the line despite the Liberals’ going in to the night holding it on a margin of only 0.4 per cent.

In another blow, there was a swing to the Liberals in the safe Labor seat of Kogarah, which has a large Chinese-Australian population, although they will hold it.

Labor leader Michael Daley’s campaign was rocked in the final week after a video emerged of him telling a party function that jobs in Sydney were being taken by foreigners, “from typically Asia”.

There was a 4.5 per cent swing to the Liberal party in the electorate and Green said those numbers were at odds with those in nearby seats.

Ms McKay said the past week had damaged her party’s campaign and the comments in that video were a “major setback”.

“Look, to be honest, I think last week really hurt us,” she said.

Adding to Labor’s pain is the new Keep Sydney Open Party, aimed at young, left-leaning voters.

Green said the party had brought down the Labor and Green votes in Coogee and East Hills.

“It’s not a big difference, but I think it might have intruded in the two-party preferred swing,” Green said.

The election campaign saw Ms Berejiklian push her “strong and stable government” mantra and highlight the Coalition’s 45 major infrastructure projects underway across the state.

Although there were fears inside the party that voters would punish them because no ribbons had been cut — during the campaign she took a big-picture view and told people in the state that “New South Wales could have it all”.