Australia was spared another leadership competition as Scott Morrison, its prime minister, pledged yesterday (SUN) that his embattled government would serve out a full term.

The announcement came as the conservative coalition looked set to lose its majority after a voter backlash in a crucial Sydney by-election.

The Liberal-National coalition, which has a one-seat parliamentary majority, appeared headed for minority government status after a huge swing in a traditionally safe seat, fuelled by anger over the ousting of former prime minister Malcolm Turnbull in August.

But despite the Liberal candidate conceding defeat Saturday after high-profile independent Kerryn Phelps captured an apparently insurmountable lead in the seat of Wentworth, the count has narrowed sharply as postal votes are counted.

While most analysts said it appeared likely Ms Phelps would hold on to the win, Mr Morrison struck a more upbeat tone.

The prime minister, who must call national elections by mid-May, acknowledged voter anger over political infighting in Canberra but said he was determined to stay on even if the coalition becomes a minority government.

"Australian people expect governments to serve their term. We are elected to serve our term and that is what we are going to do," he said.