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 - in power since 2006 - has congratulated his rival.
Justin Trudeau is son of late Prime Minister Pierre Trudeau, considered the father of modern Canada.
Trudeau's to-do list
Addressing jubilant supporters, Mr Trudeau said Canadians had "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.
During the 11-week election campaign, the Liberal Party said it would:
- Cut income taxes for middle-class Canadians while increasing them for the wealthy
- Run deficits for three years to pay for infrastructure spending
- Do more to address environmental concerns over the controversial Keystone oil pipeline
- Take in more Syrian refugees, and pull out of bombing raids against Islamic State while bolstering training for Iraqi forces
- Legalise marijuana
Why Harper lost: Anthony Zurcher, BBC News, Montreal
It was a sweeping victory that seemed unthinkable five years ago, improbable just months ago and unlikely even a few days ago.
When Mr Harper first announced that this year's general election campaign would be a record 78 days long, conventional wisdom was it would benefit the Conservatives, giving them more time to bring their financial advantages to bear.
In hindsight, however, the lengthy campaign gave Mr Trudeau an opportunity to introduce himself to Canadians and overcome Conservative attacks that characterised the 43-year-old former high-school drama teacher as too inexperienced to lead the Canadian nation.
Mr Trudeau also successfully outmanoeuvred the New Democratic Party, campaigning to that party's left on economic issues.
For Mr Trudeau, the hard work of bringing the Liberal Party back from the ashes is over. Now, as the next prime minister of Canada, the even harder work of governing is about to begin.
From austerity to deficit
The economy loomed large during the campaign. Mr Harper highlighted his legacy of balanced budget and tax cuts, while Mr Trudeau pointed to sluggish growth to support his calls to boost demand through public spending.
Mr Trudeau's infrastructure policy is projected to cost C$10bn in the first two years, equivalent to 0.5% of Canada's GDP - tipping the federal budget into deficit. But, BBC business reporter Robert Plummer says, if the money is spent on the wrong kind of infrastructure, it may not do any good while saddling the government with unnecessary debt.
Whatever happens, richer Canadians can expect to face a higher tax bill, handing over more than half their income in combined federal and provincial taxes, while ordinary folks can look forward to tax breaks.
And in the short term, Mr Trudeau's policies may help stabilise the economy, making it unlikely that the Bank of Canada will cut interest rates further - meaning borrowing costs should remain low and house prices relatively high.
What now for Harper?
Mr Harper, one of the longest-serving Western leaders, had been seeking a rare fourth term.
Speaking after the polls closed, he said he had congratulated Mr Trudeau, and that the Conservatives would accept the results "without hesitation".
Mr Harper will stand down as Conservative leader but remain as an MP, his party says.
There is no fixed transition period under Canada's constitution. Mr Trudeau is expected to be sworn in in a few weeks' times.
Tom Mulcair of the left-leaning New Democratic Party (NDP) said he had "congratulated Mr Trudeau on his exceptional achievement".
The NDP is on course to win 44 seats, less than half the number they held in the outgoing parliament.