Prime Minister Scott Morrison admitted defeat, and the opposition Labor Party appeared poised to end nearly a decade of conservative dominance.