The Morrison government has been resoundingly defeated, with Labor headed for office, although whether in a minority or majority was unclear late Saturday night.
Anthony Albanese becomes Australia's 31st prime minister.
Labor had 73 seats at the end of Saturday night, with 76 needed for majority government. A number of seats remain in doubt.
The election has been a triumph for the teal independents, with up to six new teals set to join a record crossbench.
Treasurer Josh Frydenberg is set to lose his seat of Kooyong to teal independent Monique Ryan.
According to the ABC, Labor has won the Liberal seats of Chisholm and Higgins in Victoria, Robertson and Reid in NSW, Boothby in South Australia, and in Western Australia Swan, Pearce, Hasluck, held by the Minister for Indigenous Australians, Ken Wyatt, and Tangney held by Special Minister of State, Ben Morton.
But Labor frontbencher Kristina Keneally is expected to be defeated in her bid to win the Sydney seat of Fowler. The seat is likely to taken by independent Dai Le.
Apart from Kooyong, teal independents have defeated Liberals in Goldstein in Victoria, and North Sydney and Mackellar in NSW, with Wentworth in the balance.
Frydenberg told supporters on Saturday night that while mathematically it was still possible to win, it was definitely difficult.
The election has also been a big victory for the Greens, which have won Ryan from the Liberals in Queensland. The Greens may also pick up the Queensland Labor seat of Griffith. The Liberal seat of Brisbane is in play between Greens, Labor, and the Liberals. In the previous parliament, the Greens have only had the seat of Melbourne held by their leader Adam Bandt.
Scott Morrison conceded defeat before 11pm. He announced to supporters that he would quit the leadership.
"I will be handing over the leadership at the next party room meeting to ensure the party can be taken forward under new leadership which is the appropriate thing to do," Morrison said.
"Tonight, it's a night of disappointment for the Liberals and Nationals, but it's also a time for Coalition and members and supporters all across the country to hold their highs head.
"We have been a strong government, we have been a good government. Australia is stronger as a result of our effort over these last three terms."
"We hand over this country as a government in a stronger position than we inherited it when we came to government those years ago under Tony Abbott," he said.
Albanese said: "Tonight the Australian people have voted for change.
"My Labor team will work every day to bring Australians together".
"I want to find that common ground where we can plant our dreams," he told supporters.
He said: "Together we can end the climate wars".
"I hope my journey in life inspires Australians to reach for the stars."
The loss of Frydenberg leaves Peter Dutton as the favourite to become leader of the opposition.
The Coalition and Labor both have very low primary votes, an indication of the disillusionment of voters with both sides.
The national swing to Labor was about 3% on the latest figures. The Coalition primary vote was about 36%, Labor's vote about 32% and the Greens 12%.
In Western Australia, where Morrison campaigned on Friday, the Liberal vote collapsed, with a swing against them of more than 10%.
Finance Minister and senior moderate Simon Birmingham, speaking about Warringah, where independent Zali Steggall has retained her seat against controversial Liberal candidate Katherine Deves, said: "I think it sends a message about what Australians believe when it comes to issues of respect, of inclusion, of diversity.
Birmingham said there had been a "contagion effect" from Warringah that punished Liberals in adjacent seats.
Teal independent Zoe Daniel, who has won Goldstein, named after suffragette Vida Goldstein, who failed in her effort to enter federal parliament, said: "Today I take her rightful place".
Author: Michelle Grattan - Professorial Fellow, University of Canberra