Australia's ruling conservative coalition won a surprise victory in the country's general election on Saturday, defying opinion polls that had tipped the center-left opposition party to oust it from power and promising an end to the revolving door of national leaders.

Prime Minister Scott Morrison compared his Liberal Party's victory for a third three-year term to the births of his daughters, Abbey, 11, and Lily, 9, who were conceived naturally after 14 years of in vitro fertilization had failed. His wife, Jenny Morrison, suffered endometriosis.

"I have always believed in miracles," Morrison, 51, told a jubilant Sydney crowd as he claimed victory.

Get Breaking News Delivered to Your Inbox

"I'm standing with the three biggest miracles in my life here tonight, and tonight we've been delivered another one," he said, embraced by his wife and daughters.

Australia's newly elected Prime Minister Scott Morrison (C) arrives to deliver a victory speech with his family after winning the Australia's general election in Sydney on May 18, 2019. Saeed Khan/AFP/Getty Images

Opposition leader Bill Shorten had earlier conceded defeat as the coalition came close to a majority in the 151-seat House of Representatives, where parties need a majority to form a government.

"I'm disappointed for people who depend upon Labor, but I'm glad that we argued what was right, not what was easy," Shorten told his supporters.

The tight race raised the prospect of the coalition forming a minority government. The conservatives became a rare minority government after they dumped Malcolm Turnbull as prime minister for Morrison in an internal power struggle last August. The government then lost two seats and its single-seat majority as part of the blood-letting that followed.

Morrison had focused his campaigning on polling that showed while Labor was more popular than the government, the prime minister was more popular than Shorten. Morrison, a former tourism marketer, promised lower taxes and better economic management than Labor.

Morrison began the day Saturday by campaigning in the island state of Tasmania, where the Liberals appeared to have gained two Labor-held seats. He then flew home to Sydney to vote and to campaign in Sydney seats.

Shorten campaigned hard on more ambitious targets to reduce Australia's greenhouse gas emissions.

The government has committed Australia to reduce its emissions by 26% to 28% below 2005 levels by 2030. Labor has promised a 45% reduction in the same time frame.

Shorten, a 52-year-old former labor union leader, has also promised a range of reforms, including the government paying all of a patients' costs for cancer treatment and a reduction of tax breaks for landlords.

