Australia’s political parties began horse-trading on Sunday to break an anticipated parliamentary deadlock after a dramatic election failed to produce a clear winner, raising the prospect of prolonged political and economic instability.

The exceptionally close vote leaves Prime Minister Malcolm Turnbull’s center-right Liberal Party-led government in a precarious position, potentially needing the support of independent and minor parties.

It has also opened the door to the possibility, albeit less likely, that the main opposition Labor Party could win enough backing from the smaller parties to form government itself, although Turnbull said on Sunday he remained “quietly confident” of returning his coalition to power for another three-year term.

“I can promise all Australians that we will dedicate our efforts to ensure that the state of new parliament is resolved without division or rancour,” Turnbull told reporters in Sydney.

He said he had already spoken to the smaller parties – or crossbench – that may ultimately decide who governs.

We always seek to work constructively with all of the members of the parliament as indeed we have sought to do in the past,” he added.

Bill Shorten, the leader of the opposition Labour Party, told reporters in Melbourne that “what I’m very sure of is that while we don’t know who the winner was, there is clearly one loser: Malcolm Turnbull’s agenda for Australia and his efforts to cut Medicare“, referring to the state healthcare service.

The election was meant to put a line under a period of political turmoil which has seen four prime ministers in three years. Instead it has left a power vacuum in Canberra and fuelled talk of a challenge to Turnbull’s leadership of the Liberal Party, less than a year after he ousted the then prime minister Tony Abbott in a party-room coup.

If the coalition fails to form a government, it would be the first time in 85 years an Australian ruling party has lost power after its first term in office.

Vote counting from Saturday’s poll could take a week or more, and the coalition will rule under caretaker provisions in the interim.