Supporters of Canadian Liberal Party leader

Canada's Liberal leader Justin Trudeau, the son of a popular former prime minister, won the general election in a landslide, television networks projected -- a stunning defeat for Stephen Harper's Conservatives.

Networks CBC and CTV projected the 43-year-old Trudeau -- who ran a combative campaign and offered up what he called a bold "new vision" for the nation -- would form a majority government with more than 170 of the 338 seats in the House of Commons.

Public opinion had swung wildly during the hard-fought campaign, one of the longest in the country's history, but final polling showed Trudeau's Liberals eight points ahead of Harper's Tories -- an edge apparently borne out at the polls.

Early results showed the Liberals swept all 32 seats in Canada's Atlantic provinces, doubling their popular support in the region, and scored well in key Ontario and Quebec provinces.

The party came from behind late in the campaign, with Trudeau -- the eldest son of Pierre Trudeau, considered the father of modern Canada -- promising "not just a change in government, but a better government."

His supporters erupted in cheers at a Montreal hotel upon hearing the first projections.

"I've known Justin Trudeau for a long time and he's someone who is very courteous and honest," party supporter Max Liberman told AFP.

For many Canadians, the election was a referendum on Harper's stiff management style, as well as who would be best placed to put the country's struggling economy back on track.

Trudeau was elected Liberal leader only two years ago, coming after two past leaders failed to unseat Harper in 2008 and 2011 and subsequently resigned.

He appears to have made good on his hope to recreate the "Trudeaumania" that swept his charismatic late father to power in 1968.

Harper, who took power in 2006, had been seeking a fourth mandate.

But Trudeau tapped into a strong desire for change in government after three consecutive Tory administrations, and took advantage of an all-time low in Harper's popularity.

Indeed, "there was a kind of mini Trudeaumania" surrounding the campaign, said Claude Denis, a politics professor at the University of Ottawa.

- Victory after long campaign -

The 11-week campaign was one of the longest in Canada's history, and gave voters unprecedented exposure to party leaders and their ideas in five debates and almost daily stump speeches.

Trudeau campaigned on a pledge to raise taxes on the richest and lower rates for middle-income Canadians, while spending billions on new infrastructure in order to give the struggling economy a boost.

Along the way was debate on how Canada should handle a record influx of people fleeing war in Syria, a court ruling quashing a ban on the niqab and a recession.

The left-leaning NDP, led by Thomas Mulcair, had hoped to build on its second-place finish in the last ballot, in 2011, and govern for the first time ever.

But the party stumbled in recent weeks, losing key support in Quebec province over its opposition to the popular ban on the niqab, the head covering worn by some Muslim women. It looked to finish in third place.

At times, the battle descended into personal attacks, with Tory ads suggesting that Trudeau -- with his youthful good looks -- was "just not ready" to be prime minister.

But arguably, it also gave him time to sharpen his campaign skills, and give Canadians a chance to get to know him better -- his colorful past includes work as a snowboard instructor, a bartender and a bouncer.

By the end of the campaign, Trudeau had even lost his voice.

Former senior Tory minister Peter MacKay, who did not seek re-election in northeastern Nova Scotia, told public broadcaster CBC the "sea of change... (was) not what we'd hoped for."

But "people were looking for something different," he acknowledged.

"There's an ebb and flow in politics," MacKay added, vowing the Conservatives would be back.