Canada's Liberal Party, led by the son of the country's most famous political figure in the second half of the 20th century, ended the nine-year Conservative premiership of Stephen Harper with a landslide victory in Monday's federal election.

According to a tally by the Canadian Press, the Liberals passed the 170-seat threshold needed to gain control of parliament at 12:15 a.m. ET Tuesday. In all, the Liberals won 184 seats. The Conservatives were a distant second with 99 seats, while the left-wing New Democratic Party placed third with 44 seats.

The results mean that Justin Trudeau, 43, a former schoolteacher and son of the late Prime Minister Pierre Trudeau, will become the second-youngest leader in Canada's history. Trudeau's Liberals had been favored to win the most seats, but few expected a majority and fewer foresaw the final margin of victory.

"We beat fear with hope," Trudeau said in his victory speech to supporters in Montreal early Tuesday. "We beat cynicism with hard work. We beat negative, divisive politics with a positive vision that brings Canadians together. Most of all we defeated the idea that Canadians should be satisfied with less."

"The people are never wrong," Harper said in his concession speech in Calgary. "The disappointment is my responsibility and mine alone."

Harper said he called Trudeau to congratulate him. A statement from the Conservative Party announced that Harper would resign as party leader, but would remain a member of parliament.

Harper had said he would step down if his party didn't win the most seats. Former colleagues of Harper said he would be personally devastated to lose to a Trudeau, the liberal legacy he entered politics to destroy.

Trudeau, who has re-energized the Liberal Party since its devastating electoral losses four years ago, promises to raise taxes on the rich and run deficits for three years to boost government spending. His late father, who took office in 1968 and led Canada for most of the next 16 years, is a storied name in Canadian history, responsible for the country's version of the Bill of Rights.

Pierre Trudeau remains one of the few Canadian politicians known in America, his charisma often drawing comparisons to John F. Kennedy. A bachelor when he became prime minister, he dated actresses Barbra Streisand and Kim Cattrall and married Justin's mother while in office when she was just 22 years old.

"We have a chance to bring real change to Canada and bring an end to the Harper decade," Trudeau said this past weekend in Harper's adopted home province of Alberta, traditionally a Conservative stronghold.

Canada had shifted to the center-right under Harper, who has lowered sales and corporate taxes, avoided climate change legislation and clashed with the Obama administration over the Keystone XL pipeline.

The Trudeau victory is expected to ease tensions with the U.S. Although Trudeau supports the Keystone pipeline, he argues relations should not hinge on the project. Harper has clashed with the Obama administration over other issues, including the recently reached Iran nuclear deal.

Trudeau's opponents pilloried him as too inexperienced, but Trudeau embraced his boyish image on Election Day. Sporting jeans and a varsity letter jacket, he posed for a photo standing on the thighs of two his colleagues to make a cheerleading pyramid, his campaign plane in the backdrop with "Trudeau 2015" painted in large red letters.

Harper, 56, visited districts he won in the 2011 election in an attempt to hang onto them. On Saturday, he posed with Toronto's former crack-smoking mayor, Rob Ford, in a conservative suburb.

Hurt when Canada entered a mild recession earlier this year, Harper made a controversy over the Islamic face veil a focus of his campaign, a decision his opponents seized on to depict him as a divisive leader.

"A sea of change here. We are used to high tides in Atlantic Canada. This is not what we hoped for," said Peter MacKay, a former senior Conservative cabinet minister, shortly after polls closed in Atlantic Canada.

Paula Mcelhinney, 52, from Toronto, voted Liberal to get rid of Harper.

"I want to get him out, it's about time we have a new leader. It's time for a change," she said.

The Associated Press contributed to this report.