Australia's prime minister said on Sunday that his conservative coalition government was re-elected for a second three-year term, after a chaotic national election that left the country in a state of political paralysis for more than a week while officials scrambled to sort out who had won the tight race.

Vote counting was still underway from the July 2 ballot, but Prime Minister Malcolm Turnbull said his conservative Liberal Party-led coalition had secured a victory, and that opposition leader Bill Shorten had called him earlier to congratulate him on being re-elected.

"We have resolved this election," Turnbull told reporters.

The election was not, however, entirely resolved. Parties are required to hold at least 76 seats in the 150-seat House of Representatives to form a majority government, and neither party has yet to officially reach that number.

There are two possibilities: Either the coalition will form a majority government by a slim margin, or the country will have a hung parliament. If that happens, Turnbull's coalition will forge an alliance with independent and minor party lawmakers to form a minority government.

Asked whether he thought his party would win an outright majority, Turnbull replied simply: "We've won the election."

With about a quarter of the ballots still left to be counted, the Australian Electoral Commission said the coalition was leading in 76 seats, Labor in 69 seats and minor parties and independents in five. It could take days or weeks to resolve the final tally.

Despite the victory, Turnbull faces a tough road ahead with a divided party, a fractured Senate and a weary electorate. The government went into the election with a comfortable majority of 90 seats and few had predicted it would suffer such steep losses.