After polls predicted the Coalition would struggle to retain power in NSW, voters delivered surprisingly few changes to the Parliament.
But a few new faces could make a big difference to the state’s future.
Here are some of the victors — and victims — of the NSW election.
The Coalition has not enjoyed three consecutive terms of government since the 1970s.
Since Labor first formed government in 1910, only three Coalition premiers have been re-elected.
There have been three significant periods of Liberal-National leadership in NSW, but none of them lasted longer than 12 years.
The Coalition faced criticism over the Sydney Football Stadium demolition, and delays and cost over-runs on major infrastructure projects, and was accused of being ‘Sydney-centric’ by some rural Opposition MPs.
But with Gladys Berejiklian returned to office, the Coalition now has a shot at 12 years straight in office in this state — the longest period the Coalition has been in power in NSW since 1904.
That’s a long time for a so-called Labor state.
For the second election in a row, the Labor Party dumped a leader just months out from the poll for a relatively unknown contender.
The party held 34 seats heading into the election, and needed 13 more to form a majority government.
For the dream to turn into reality, The Nationals had to suffer a resounding defeat in the bush and several marginal Liberal seats had to fall.
Despite the Nationals suffering large swings in the regions, Labor were unable to break the Coalition’s grip on power.
But Michael Daley said he would remain Labor leader.
The Nationals did not fare well in the battle for the bush — the party lost at least two seats, and three more are under threat.
It retained 12 seats and gained none.
It’s lost Murray in the state’s south-west to the Shooters, Fishers and Farmers (SFF) after a 27.8 per cent swing to the minor party.
The SFF also won the far western seat of Barwon, where there has been a 21.5 per cent swing in its favour.
And, late on Saturday night, Labor had pulled ahead of the Nationals in Lismore.
While The Nationals are pulling ahead by a per-cent in Dubbo the party has suffered a 19.9 per cent swing in favour of Independent Mathew Dickerson.
Winner: Shooters, Fishers and Farmers
The SFF fielded a candidate in 25 seats.
With more than 50 per cent of the vote counted, the ABC computer had them winning two seats and leading in a third.
Helen Dalton from the Shooters, Fishers and Farmers is set to win the marginal regional seat of Murray on her third attempt, ousting sitting Nationals MP Austin Evans.
The SFF went to the election with just one incumbent member in Philip Donato.
Winner: One Nation
Early results suggest Pauline Hanson’s One Nation will pick up one, possibly two, seats in the Upper House.
But results are showing the party’s overall vote in the Lower House is about 1.2 per cent, which is a fraction of where opinion polls placed it.
Former Federal Labor leader Mark Latham will take a seat in the NSW Upper House for One Nation.
He campaigned on reduced immigration, personal income tax cuts and a “Trump-style travel ban” to prevent terrorism.
He was at the top of One Nation’s ticket and now appears certain to re-enter public office.
“We only ran in 12 Lower House seats so I’m keen to see what happens in the Legislative Council,” Mr Latham said on election night.
His friend and One Nation donor Alan Jones called the results an “extraordinary personal triumph” for Mr Latham.
The Greens held three seats heading into the election, but two of those were marginal.
Early results showed the party on track to retain all three seats, registering positive swings in each of them.
Jamie Parker retained the seat of Balmain, which he won in 2011.
The Greens say they will not do deals with the Coalition if it does not win enough seats to form a majority government.
Winner: Gladys Berejiklian
Gladys Berejiklian will emerge from this election with a boost in confidence and authority.
She is NSW’s second female Premier, but the only one to win an election.
Ms Berejiklian was criticised throughout the campaign for failing to sell the Government’s message, but the victory is likely to silence many of her critics within the Coalition.
Her party built a presidential-style campaign around the Premier’s personal brand, in order to help distance the NSW Liberals from their federal counterparts.
Ms Berejiklian has proven that brand is strong enough to carry her to victory.
Loser: Michael Daley
In his concession speech, Mr Daley told supporters he had only been in the top job for 134 days and it was his “intention” to stay put.
In the immediate aftermath of the result, senior members of his shadow cabinet defended him and dismissed speculation he would be replaced.
But they also conceded the final week of the campaign did hurt them.
Labor’s failure to make any major gains will have many questioning what went wrong, and no doubt some MPs will be agitating for a change of leadership.
Loser: Bruce Notley-Smith (Coogee)
Labor’s Marjorie O’Neill won Coogee, a small electorate in Sydney’s eastern suburbs, which was previously held by Liberal MP Bruce Notley-Smith with a margin of 2.9 per cent.
Coogee was held by Labor from 1974 until 2011, when it was won by Mr Notley-Smith.
Mr Notley-Smith was the first openly gay member to be elected to the Legislative Assembly and was re-elected in 2015.
Although music festivals and nightlife were pressing issues for young NSW voters, ABC election analyst Antony Green suggested the Keep Sydney Open party lowered the Labor and Green vote in Coogee and nearby East Hills.
Ms O’Neill works as a lecturer and holds a PhD in management economics.
Winner: Tamara Smith (Ballina)
The Greens’ Tamara Smith retained the seat of Ballina on the far north coast of NSW, registering a favourable 4.2 per cent swing.
Ballina had been a National Party stronghold under the leadership of Don Page since 1988, until his retirement in 2015.
It is one of three seats retained by the Greens at this election.
Ms Smith was elected in 2015 on Labor preferences following a campaign dominated by the coal seam gas issue.
She is a solicitor specialising in energy law, social justice and human rights, and held off Nationals opponent and former NSW National Party state director Ben Franklin to retain the seat.
Loser: Keep Sydney Open
Keep Sydney Open morphed from a movement to a political party with the aim of being heard by the state’s politicians.
Small parties have to start somewhere and Keep Sydney Open was vocal about wanting to be an alternative to the two-party system, but on election day analysts believe their candidates took votes from Labor and the Greens, ultimately helping the Coalition.
The party ran in 42 seats in the Lower House but it did not field a candidate in the central seat of Sydney — arguably the seat most likely to be impacted by their policies.
“It’s not a big difference, but I think it might have intruded in the two-party preferred swing,” said ABC election analyst Antony Green.
In doubt: Dubbo
On Sunday afternoon, Nationals candidate Dugald Saunders pulled ahead of Independent Mathew Dickerson in the seat of Dubbo by 2,838 votes, with 64 per cent counted.
Mr Dickerson, a self-described self-made award-winning businessman, was born and bred in Dubbo and served on its council for 12 years — three as deputy mayor and five as mayor.
The regional electorate, held by former NSW police minister Troy Grant before he announced his retirement, was until election night a very safe seat for the Nationals.
However, even if the Nationals retain the seat, they will have suffered a swing of almost 20 per cent against them.
In doubt: Lismore
The sitting Nationals MP Thomas George announced his retirement before the election, which opened up an intriguing three-way contest with Labor and the Greens in the seat of Lismore.
The ABC election computer has Labor’s Janelle Saffin ahead of Nationals newcomer Austin Curtin.
With 76.5 per cent of the vote counted, Ms Saffin had polled 51.5 per cent, while Mr Curtin had 48.5 per cent on a two-party preferred basis.
The seat was previously held by The Nationals with a margin of 0.2 per cent.
Ms Saffin served in the NSW Legislative Council from 1995 to 2003 and then won the local seat of Page at the 2007 federal election and retained it until 2013.
Greens candidate Sue Higginson gained almost a quarter of the first-preference votes.
In doubt: East Hills
The sitting Liberal MP, Glenn Brookes, announced he would not be contesting the 2019 election after he was caught up in a donation scandal that breached campaign finance laws.
Mr Brookes was the first non-Labor member for East Hills, in Sydney’s south-west, in almost 60 years.
He won by fewer than 500 votes in 2011, giving him a margin of 0.4 per cent.
The ABC election computer has Liberal Wendy Lindsay leading in the seat, with Labor’s Cameron Murphy following closely behind.
If Ms Lindsay wins, she will deliver the Coalition the 47th seat it needs to form majority Government.