Australians usually know who their next leader will be on the night of their vote, but the July 2 poll was too close to call, triggering a complicated system of centralized vote counting that still hasn't technically finished.
Nonetheless, the Australian Electoral Commission
on Sunday was able to call the winner of all 150 seats, showing the ruling conservative Liberal Party, which always runs in coalition with the rural-based Nationals, had secured the 76 seats of parliament needed to govern in their own right.
The opposition Australian Labor Party won 69 seats, and the remaining five went to smaller parties or independent candidates.
"This is great day today. It's a great day to thank the Australian people for the decisions they've taken in this election, and to commit to them anew our absolutely unrelenting determination to ensure that this parliament delivers good government, wise legislation and builds on the strengths of our economy to ensure that truly our greatest days are yet ahead of us," Turnbull told reporters at a press conference broadcast on national television.
Despite coming out on top of the polls, the coalition was expected to fare better than it did, prompting calls from within the Liberal Party for Turnbull to step down.
Turnbull's speech came after opposition Labor leader Bill Shorten conceded defeat
Shorten told reporters it had been "the longest election in 50 years" and that it was "clear that Mr. Turnbull and his coalition will form a government."
Shorten said he had spoken to Turnbull and offered his congratulations, and thanked the Australian people, saying they had "vindicated our system of democracy."
He said that his Labor party would work with the coalition "where there is common ground."
Five prime ministers in six years
Australia was left in limbo following the July 2 vote
, which showed no clear majority and seemed to indicate the country was headed for a hung parliament. Following the counting of more than a million postal votes, the ruling coalition pulled marginally ahead in the total.
In recent years Australian politics has been rocked by incessant infighting in both parties, which have resulted in frequent leadership changes.
Labor regained power in 2007, electing Kevin Rudd the country's prime minister after 11 years of conservative rule. He was ousted by Julia Gillard, who went on to win the election to remain prime minister, only to be deposed by Rudd, who lost to the conservatives.
Australia voted in the Liberal Party's Tony Abbott in 2013, who was beaten in a leadership challenge by Turnbull just two years later as his popularity plunged.
The economy was the key battleground for the election, with the country struggling to return its budget to surplus. The ruling coalition promised tax cuts for companies but higher taxes for those earning AUD$250,000 ($189,250) or more.
The country's economy is dependent on its exports of extractive resources, such as coal, and has been hit hard by the economic slowdown in China, forcing Australians to do some soul-searching about what else their country has to offer.