MALCOLM Turnbull was preparing to stage a great escape last night in a tight election contest, despite big Labor swings in some states.
As Labor leader Bill Shorten declared he was "ready to serve" as he blitzed polling booths, the ALP was predicting a national swing of up to 4 per cent - but not in the marginal seats it needed to form government or deliver a hung parliament. A big scare campaign on Medicare was driving the Labor comeback.
Just before 8.30pm, Labor had gained a 2.9 per cent swing and the national two-party-preferred vote was all but deadlocked at 50.2 to 49.8. 
A Galaxy Research exit poll of 25 marginals seats predicted the election was too close to call, with a swing to Labor delivering it 68 seats - short of the 76 needed to form a majority government.
By last night some pundits were guardedly preparing to call it for Malcolm Turnbull on the grounds that Labor would fall short of picking up the seats it needed in Queensland.
The rise and rise of Nick Xenophon was the big story in South Australia, where his party sensationally captured   Mayo, in which the Liberals' Jamie Briggs conceded to Rebekha Sharkie just before 8.30pm.
"After a tough fight, tonight hasn't been our night. Thanks to those who supported me and my best to the new member - it's a great electorate," he said on Twitter.
Liberal deputy leader Julie Bishop admitted the vote was tight and said it was too early to call a result.
"We've said from the outset that this would be a very close election and I believe it's proving to be such," she said.
Ms Bishop said her home state of Western Australia might well decide the outcome.
With almost 40 per cent of the votes counted in   Mayo, Ms Sharkie, who once worked for Mr Briggs, was leading 56-44 on a two-party-preferred basis.
Mr Briggs had been confronted by a female voter after he cast his ballot at Stirling, asking whether he regretted an -incident with a female public servant in Hong Kong, which last   December forced him to quit the ministry.
Early results showed the Xenophon vote punishing the Liberals, who lost almost 10 per cent of primary support across the state, compared with Labor falling 5 per cent.
In Grey, Liberal MP Rowan Ramsey's primary support slumped to 43 per cent in early counting, putting him at risk of losing the once-safe seat to NXT candidate Andrea Broadfoot.
Senator Xenophon said he expected to pick up three senators in SA, saying there was a sense of disaffection in the state because of the loss of manufacturing jobs.
"It's not rocket science - people are worried about their jobs, they are worried about the impact of trade agreements," he said.
Fellow high-profile independent Pauline Hanson declared she was confident of picking up two Senate seats in Queensland as she arrived at her election-night function at an Ipswich hotel.
Controversial broadcaster Derryn Hinch also was hopeful of securing a Senate spot, boosted by his No.1 position on the Victorian ballot paper.
Earlier, Mr Turnbull slipped the net of a huge media contingent trailing him to catch a train to Penrith in Sydney's western suburbs.
But he gave a hint that the Liberal Party was still nervous, visiting marginal seats in NSW.
His office had told journalists he was going to have a quiet day, possibly returning home to Point Piper. Instead, he escaped on a train to Penrith.
The Labor leader, buoyed by a tight Newspoll, greeted early-morning voters amid predictions the Coalition was slightly ahead of Labor, 50.5 to 49.5.
Labor needed to win about 19 seats to govern in its own right, a prospect even the most optimistic Labor chiefs believe is out of reach.
Mr Shorten and wife Chloe walked to a school in Moonee Ponds, in Melbourne, with children Rupert and Clementine, greeting voters in the electorate of Maribyrnong.
"Feeling pretty positive," he told reporters.
The nailbiting result came as former prime minister Tony Abbott appeared to take a veiled swipe at Mr Turnbull during an interview with broadcaster Alan Jones.Asked what it felt like to be an "anonymous figure", he said: "Egomaniacs normally get found out very quickly in this business and that's as it should be."