Scott Morrison, Australia’s conservative prime minister, scored a surprise victory in federal elections on Saturday, propelled by a populist wave — the “quiet Australians,” he termed it — resembling the force that has upended politics in the United States, Britain and beyond.

The win stunned Australian election analysts — polls had pointed to a loss for Mr. Morrison’s coalition for months. But in the end, the prime minister confounded expectations suggesting that the country was ready for a change in course after six years of tumultuous leadership under the conservative political coalition.

“I have always believed in miracles,” Mr. Morrison said at his victory party in Sydney, adding, “Tonight is about every single Australian who depends on their government to put them first. And that is exactly what we are going to do.”