Labor has claimed victory in a NSW seat vacated by a disgraced MP convicted of rape, nabbing it in a rare win for the government.
The by-election in Kiama was held on Saturday to pick a replacement for former MP Gareth Ward, who was convicted of sexual and indecent assault in July.
Labor had held the NSW south coast seat for three decades until Ward claimed it for the Liberals in 2011.
Labor candidate Katelin McInerney's victory was the first major electoral test for the Minns government.
When Labor declared victory just two hours after the polls closed, McInerney was leading Liberal candidate Serena Copley 62 per cent to 37 per cent on the two-party preferred vote.
Premier Chris Minns hailed the result was a humbling success.
'My government views this result as an invitation to work even harder for the entire state,' he said on Saturday night.
'I want to thank the people of Kiama for putting their trust in Labor. We do not take that trust for granted.'
Labor candidate Katelin McInerney is the new MP for Kiama
Liberal candidate Serena Copley conceded defeat on Saturday night
Former Kiama MP Gareth MP (pictured with former NSW premier Gladys Berejiklian) resigned after he was convicted of rape
'Kiama now has that voice inside government, and I know Katelin will be a fierce advocate for her community.'
With 13 candidates vying for people's votes, election analyst Ben Raue called the win for Labor two hours after polls closed.
It's unusual for a government to gain a seat in a by-election, but Mr Raue said Labor had more incentive to work harder for the victory.
It is the first time in three decades a seat in a by-election has gone to the government rather than against.
A loss in Kiama would not have pushed NSW Labor out of minority government, but a win will put the party one step closer to majority power when the 2027 contest comes around.
The stakes were arguably higher for state Opposition Leader Mark Speakman, whose fate as party boss could be decided by Kiama voters.
Asked if his leadership would survive a loss, Mr Speakman batted away speculation.
'We are the underdogs,' he told reporters in Kiama on Friday.
Labor candidate Katelin McInerney was confident of victory when she voted on Saturday
The result emerged just two hours after polls closed on the NSW south coast on Saturday
'I will be the leader. I will continue to be the leader.
'It's about the best representative for Kiama ... it's about electing someone who will take the toughest fight up to the government.'
Ward resigned in August after he was convicted for sexual and indecent assault in July and he is due to be sentenced next week.
Though Ward maintained a significant personal vote at the previous election, Mr Minns said Saturday's by-election would draw a line under the disgraced MP's time in office.
'Now it's about turning the page,' he said.