Former political adviser Cressida O'Hanlon will be South Australia's newest member of parliament after surviving a late comeback from her Liberal rival in a nail-biting by-election count.
After an extra 2000 votes were counted on Wednesday, Ms O'Hanlon still held a 345 vote two-party-preferred lead over Anna Finizio for the electorate of Dunstan in Adelaide's inner-east.
Ms O'Hanlon had stormed out to a commanding lead after on-the-day votes were tallied up on Saturday night after enjoying a 4.4 per cent swing on the booths - more than enough to overturn the 0.5 per cent margin the Liberals held the seat by.
But with pre-poll and postal votes only set to begin counting on Monday, the 51-year-old had a nervous wait before her victory could be confirmed.
Declaration votes, especially postals, tend to favour the Liberal Party over Labor, but given the large swing towards Ms O'Hanlon on Saturday, it came as some surprise when they fell more strongly for the Liberals than even the previous election result.
However, as tallying continued throughout the week, it became clear Ms O'Hanlon had enough of a buffer to survive the late postal vote onslaught.
Ms O'Hanlon, a mother of two who has lived in the area for 11 years, used to work as a political staffer under Labor MLC Reggie Martin and now works as a corporate mediator.
Her victory breaks a 116-year hoodoo: the last time a South Australian government won a seat off the opposition at a by-election was more than 100 years ago.
Opposition Leader David Speirs said Dr Finizio had comfortably won the primary vote but preferences votes to Labor had seen her fall short of overall victory.
"I want to thank Anna for her tireless work on the campaign," he said.
"She was a positive and energetic candidate who truly reflected the community she was wanting to represent."
Dr Finizio thanked her supporters and the electorate.
"Every minute at your doorstep, inside your small businesses and out with you in the community was a privilege," she said.
While a historic win for the government, it still suffered a swing away on first preferences.
The biggest movers of the contest were the Greens, whose candidate Katie McCusker enjoyed a 5.5 per cent swing, making the seat the party's best in the state.
That proved to be decisive, with the Greens' higher preference flows to Labor getting Ms O'Hanlon over the line.