Kevin Rudd's Labor successor has claimed victory in his old seat despite her coalition rival refusing to concede.
Labor's Terri Butler, an industrial relations lawyer, took to the lectern among party faithful in Brisbane just after 9pm (AEST) to claim victory in the ex-prime minister's seat of Griffith.
By that time, Ms Butler had a projected two-party preferred count of 52.33 per cent, with roughly 65 per cent of the vote counted.
Ms Butler was joined at the lectern with husband and Australian Workers Union official Troy Spence.
Her 15-minute speech was particularly glowing when referring to Opposition Leader Bill Shorten and Mr Rudd, who forced the by-election after announcing his retirement from politics following Labor's general election defeat.
"I think you are just the most supportive, most fantastic, most wonderful former member that any new candidate could ever hope to have," she told Mr Rudd, who was beaming in the front row clutching a celebratory beer, as party faithful cheered her on.
Ms Butler said her victory showed voter discontent with both the Abbott Government and Premier Campbell Newman's Queensland government.
But she was full of praise for Liberal National Party (LNP) rival Bill Glasson, who was leading the primary vote, just as he had against Mr Rudd at the general election.
"Bill, every time you and I have crossed paths on the election trail, we've had extremely cordial exchanges, you've been great to deal with and I appreciate that," she said.
But Dr Glasson, an ophthalmologist, was not ready to congratulate Ms Butler just yet.
"We're not conceding tonight but obviously it's going to be difficult to get across the line," Dr Glasson told his supporters, flanked by Mr Newman and federal Attorney-General George Brandis.
"Can I suggest that the figures you currently see on the screen I believe will narrow, but we won't know I believe for a number of days where that will sit."
Dr Glasson also used his speech to renew his support for an end to the carbon tax.
Political pundits and bookmakers had tipped Ms Butler to win Griffith, particularly given a government has not claimed a federal seat off an opposition in a by-election since 1920.
However, Dr Glasson's high profile and a traditionally poor voter turnout for by-elections were tipped to make the result a lot closer than it otherwise might have been.
Ms Butler admitted while voting earlier in the day she was nervous about the result.
Dr Glasson appealed for minor party voters to preference him second.
A former Australian Medical Association president, Dr Glasson comforted an elderly woman outside the polling booth who was being treated by paramedics after he cast his vote.
The Greens' Geoff Ebbs had attracted roughly 10.5 per cent of the vote at last count, while the other eight minor party and independent candidates fielded negligible results.
Mr Shorten offered his congratulations to Ms Butler in a statement late on Saturday night.
"Her opponent was well known in the electorate after successive campaigns in a high profile seat. But Terri demonstrated that she was prepared to stand up against Tony Abbott's cuts to health and fight for the people of Griffith," the Labor leader said.
"Kevin Rudd was a great local member for the people of this area, he made a tremendous contribution to the nation and I am confident that record will continue with Terri Butler, as the new Member for Griffith."