Prime Minister Justin Trudeau has congratulated Donald Trump on his election as the next U.S. president, and promised to work with him to boost trade and security and to give Canadians and Americans a "fair shot at success."

"We're going to keep working with people right around the world. We're going to work with our neighbours, and I'm going to work with president-elect Trump's administration, as we move forward in a positive way for, not just Canadians and Americans, but the whole world," Trudeau said to a round of applause from thousands of youth taking part in a WE Day event in Ottawa.

Trudeau said the Canada-U.S. relationship is based on shared values and shared "hopes and dreams." He said the two countries will always work well together because they are strong, respectful and listen to one another.

In a statement issued earlier in the day, Trudeau said Canada has no closer friend, partner and ally than the U.S., and that he looks forward to working with Trump's administration and the U.S. Congress on trade, investment and international peace and security.

"The relationship between our two countries serves as a model for the world. Our shared values, deep cultural ties and strong integrated economies will continue to provide the basis for advancing our strong and prosperous partnership."

Prime Minister Justin Trudeau addresses WE Day crowd about Donald Trump win 1:24

Trudeau has carefully and consistently avoided making any comments or criticism of Trump during the campaign, even after it was revealed the Republican nominee had made lewd and sexist remarks.

But while he was reluctant to weigh in on the U.S. election, the Liberal Party issued a fundraising email ahead of September's first presidential debate that characterized the campaign as a "fundamental choice" between opposing values.

"Hope or fear? Diversity or division? Openness and inclusion, or turning our backs on the world?" it read, leaving little doubt which side the party was on during the race for the White House.

Pipeline push?

Interim Conservative Leader Rona Ambrose also congratulated Trump in a statement, and urged the government to pursue a strong free trade agenda to protect the North American Free Trade Agreement (NAFTA) and ratify the Trans-Pacific Partnership Agreement (TPP).

She said the government must work with the new administration to resolve trade irritants like the softwood lumber dispute and to approve a contentious pipeline project.

"President-elect Trump has made it clear that he supports the Keystone XL pipeline, as has Prime Minister Trudeau. The Conservative Party of Canada calls upon the prime minister to reach out to president-elect Trump‎ at the earliest opportunity and make approval of this job-creating project a top priority," she said.

Former Conservative prime minister Stephen Harper tweeted his congratulations on Trump's "impressive victory," and also mentioned the Keystone XL pipeline.

Congratulations to Donald Trump on his impressive victory. Canada/US partnership is strong. There is much to do, incl moving ahead with KXL. —@stephenharper

Saskatchewan Premier Brad Wall also said he hoped Trump's election would advance the Keystone project, and that it means there won't likely be a carbon tax in the U.S. anytime soon. He noted a proposed carbon tax was on the ballot in Washington state and rejected by 58 per cent of the voters.

"So it makes no sense for our federal government to push ahead with imposing a national carbon tax, when our biggest trading partner — and our biggest competitor for investment and jobs — is not going to have one," he said.

Asked about Keystone, Alberta Premier Rachel Notley hinted it wasn't a burning priority since her province looks for new energy markets as the U.S. becomes a "competitor."

"Given the state of our economy and the state of the energy industry I think that it's incumbent upon us to work with the energy industry on a number of different paths toward its recovery including enhancing our trade relationships in energy with the U.S.," she said. "It does not detract from my view that the most important objective for us is to be able to diversify our markets and to diversify our access to markets."

Conservative Party leadership candidate Kellie Leitch issued praise for the Trump win.

"Tonight, our American cousins threw out the elites and elected Donald Trump as the next president," she said in a message to supporters. "It's an exciting message and one that we need delivered in Canada as well."

'Canadian values'

Leitch said she's bringing the same message to her campaign to be Canada's next prime minister, and said she's the only candidate who is "standing up for Canadian values."

"It's why I'm the only candidate who will ensure that every visitor, immigrant and refugee will be screened for Canadian values," she said.

NDP Leader Tom Mulcair, who once called Trump a "fascist," urged Trudeau to have the courage to condemn some of the president-elect's past Islamophobic and sexist remarks.

"I think the most important thing for Canadians is that we have a Canadian government that stands up in the face of this type of behaviour — that denies equality of the sexes, that denies equality of all human beings by attacking religious and ethnic minorities. That's the stand I'd like to see from the Canadian government," he said. "I hope that Mr. Trudeau stands up to Donald Trump and defines who we are on these important issues."

Former Conservative cabinet minister Jason Kenney, who served as longtime immigration minister under Stephen Harper, did not embrace the victory.

"I've been profoundly opposed to Donald Trump's candidacy. But Americans have decided. Canada's leaders must work with him to advance our interests," he tweeted.

Canada's immigration site crashes

As election results poured in, the website for Immigration, Refugees and Citizenship Canada (IRCC) crashed due to a high volume of traffic.

Spokesman Remi Lariviere said the site became "temporarily inaccessible to users" as a result of a "significant increase in the volume of traffic."

"Shared Services Canada worked through the night and continues to work to resolve the issue to ensure that the website is available for users as soon as possible," he said.

IRCC did not immediately confirm, however, that the high volume of traffic was from U.S. visitors.

Before the election, many Americans had threatened to move north to Canada if Trump were to win.

One cheeky website, called "Cape Breton if Donald Trump Wins," generated much discussion among Americans curious about moving to Nova Scotia's rugged northern island.

Open border 'critical'

The Canadian Chamber of Commerce issued a statement stressing the importance for the federal government to build a "solid relationship" with the new U.S. administration.

President and CEO Perrin Beatty said it's "critical for our economic health" that the border between both countries remains open to allow for the swift passage of goods.

"Measures that improve Canada-U.S. trade should be our priority with this new administration, but there is a long list of topics we will need to address, from softwood lumber to NAFTA to pipelines," he said. "It's critical for our government to get some issues on the agenda early, to ensure Canada doesn't get lost in the global chatter."

Canada's ambassador to the U.S., David MacNaughton, said Canada and the U.S. enjoy "extraordinary cooperation" on shared interests such as strengthening the economy and enhancing security."

"We look forward to advancing this collaboration and working closely with the new administration, members of Congress, governors and all those who help support this unparalleled relationship," he said in a statement.