Counting in the NSW election has resumed with Premier Gladys Berejiklian sweating on winning one more seat to allow the coalition to govern in its own right for its third term.
With 65 per cent of the lower house votes counted, the coalition had 46 seats - 34 for the Liberals and 12 for the Nationals.
Labor held 35, well short of the 47 seats needed to form a majority government.
Ms Berejiklian has already promised to work with the three independents - Joe McGirr, Alex Greenwich and Greg Piper - for smooth government.
She became the first woman to be popularly elected premier in the history of NSW.
ABC election analyst Antony Green said the Berejiklian government suffered a swing of 2.3 against it, but it wasn't been enough to force it out of power.
The Liberal-Nationals went into Saturday's election with 52 seats in the lower house but it needed to only lose six seats to relinquish its majority.
Three Nationals seats - Dubbo, Barwon and Lismore - were still in doubt on Saturday night.
Candidate Dugald Saunders was in a tight fight with independent Mathew Dickerson to retain the seat of Dubbo being vacated by former leader Troy Grant.
The state's most marginal seat - East Hills in Sydney - was also going right to the wire with the Liberals' Wendy Lindsay enjoying a small swing towards her.
More than four million people had been expected to cast their votes on Saturday, at more than 2200 polling booths around the state.
Nearly 1.3 million people took advantage of early voting - at pre-poll centres or via the post, internet or telephone.
Meanwhile, in the upper house where half the votes have been counted, former federal Labor leader Mark Latham looks like making a return to parliamentary life as a One Nation MP.
Shooters, Fishers and Farmers candidate Mark Banasiak and the Greens' David Shoebridge appear certain to also be among the 21 people to win a new eight-year term.
Australian Associated Press