Canada's Liberal Party has decisively won a general election, ending nearly a decade of Conservative rule.
The centrist Liberals, led by Justin Trudeau, started the campaign in third place but in a stunning turnaround now command a majority.
Mr Trudeau, the 43-year-old son of late Prime Minister Pierre Trudeau, said Canadians had voted for real change.
Incumbent Conservative PM Stephen Harper accepted defeat and his party said he would step down as leader.
It was the longest campaign in Canada's history, and had been thought to be much closer.
Speaking after the polls closed, Mr Harper said he had already congratulated Mr Trudeau, saying the Conservatives would accept the results "without hesitation".
Addressing his jubilant supporters shortly afterwards, Mr Trudeau said that Canadians "sent a clear message tonight - it's time for a change".
"We beat fear with hope, we beat cynicism with hard work. Most of all we defeated the idea that Canadians should be satisfied with less.
"This is what positive politics can do," he said, also praising Mr Harper for his service to the country.
New Zealand Prime Minister John Key congratulated Mr Trudeau on his victory, saying the two countries had a long-standing and important friendship.
Mr Key said Canada was a security partner, an important destination for export goods and an important source of direct investment into New Zealand.
He said he looked forward to speaking soon with Mr Trudeau to congratulate him personally.
Few had predicted a Liberal victory on this scale. They look set to win 184 seats, a huge increase from only 36 that they held after suffering their worst-ever election result in 2011.
They will become the first party ever to move from third place in parliament to a majority in one election.
Meanwhile, the left-leaning New Democratic Party (NDP) is on course to win 44 seats, less than half the number they held in the outgoing parliament.
To form a majority government, a party needs 170 seats in the 338-member parliament.
'Sea of change'
Voting hours were staggered across the country and polls opened in Newfoundland at 8.30am Monday Canadian time (3.30am Tuesday NZDT). Polls closed in the west of the country at 7pm (2pm NZDT).
Early counts in the eastern provinces gave the Liberals their first taste of victory, as they led in all 32 races there.
As the results began pouring in, former Conservative Justice Minister Peter MacKay said: "A sea of change here. We are used to high tides in Atlantic Canada. This is not what we hoped for."
Mr Trudeau campaigned on a promise of change, urging voters ahead of the polling day to "come together as a country".
His charismatic father, Pierre, is considered the father of modern Canada.
Mr Harper, 56, had portrayed himself as the steady hand who could steer Canada's troubled economy back on track.
His campaign ran TV advertisements saying that Mr Trudeau was "just not ready" to take office.
Who is Justin Trudeau?
The win marks a swing toward a more multilateral approach in global politics by the Canadian government, which has distanced itself from the UN in recent years.
Mr Trudeau said during his campaign that he would repair Canada's cool relations with the Obama administration, withdraw Canada from the combat mission against Islamic State militants in favour of humanitarian aid, and tackle climate change.
The former teacher took charge of the party just two years ago, pledging economic stimulus and stirring appeals for a return to social liberalism.
Born to a sitting prime minister who came to power in 1968 on a wave of popular support dubbed "Trudeaumania", Mr Trudeau will become the second-youngest prime minister in Canadian history and brings an appeal more common in movie stars than statesmen.
He has used attacks on his good looks and privileged upbringing to win over voters, who recalled his father's rock-star presence.
Pierre Trudeau, who died in 2000, was in power for 15 years - with a brief interruption - and remains one of the few Canadian leaders to be known abroad.
His son's victory has weakened the Canadian dollar. Financial market players had praised the Conservative government for its steady hand in economic management, which spared Canada from the worst of the global financial crisis.
Justin Trudeau has pledged to run small budget deficits and spend on infrastructure to stimulate economic growth. He has also promised to raise taxes on high-income Canadians and reduce them for the middle class.
Political pundits have already begun to speculate on the makeup of a Trudeau government while pondering what caused the downfall of Mr Harper, who had been criticised for his aloof personality but won credit for his economic management.
- BBC / Reuters