Australian Prime Minister Scott Morrison has thanked voters for re-electing his conservative coalition in a shock result at the federal polls.
He told supporters he had "always believed in miracles" as partial results showed the Liberal-National Coalition close to a majority.Opposition Labor Party leader Bill Shorten has announced he is resigning after accepting defeat.
Exit polls had suggested a narrow Labor win for the first time in six years.
The final result of the election may not be known for some hours, but with more than 70% of votes counted the Coalition has won, or is ahead in, 74 seats in its quest for a 76-seat majority, with Labor on just 66 seats.
Australia has mandatory voting and a record 16.4 million voters enrolled for the election, which returns a new House of Representatives and just over half of the seats in the Senate.