08/11/2017 12:15 EDT | Updated 08/11/2017 14:52 EDT

Canada The Top Choice By Far For Tech Workers Fleeing Trump

What's bad for the U.S.'s tech sector could be good for Canada's.

AFP/Getty Images
U.S. President Donald Trump speaks after touring Snap-On Tools in Kenosha, Wisconsin, April 18, 2017, prior to signing the Buy American, Hire American Executive Order.

U.S. President Donald Trump's anti-immigration stance threatens the U.S.'s dominance in the tech sector, but it could be a big boost for Canada, which is struggling with its own tech-worker shortage.

According to a new survey from employment site Hired, Canada is the leading choice for STEM workers looking to leave the United States.

The survey of tech workers who are part of Hired's platform found 40 per cent said they have considered relocating to outside the U.S. since Trump was elected.

Of those, nearly a third — 32 per cent — prefer Canada. Germany is the second most popular destination at 12 per cent, followed by Australia and Asia at 10 per cent each.

In his first month of office, Trump issued an executive order banning travel from several Muslim-majority countries. Though that order was overturned by the courts, a second version was partly approved by the U.S. Supreme Court, and is in place until a final hearing in October.

Trump also signed an executive order called "Hire American, Buy American," which calls for a reduction in the number of H1-B visas the U.S. issues. The visas are the primary way by which tech companies bring foreign talent to the country.

"Combined with recently announced plans to eliminate a federal rule that lets foreign entrepreneurs come to the U.S. for the purposes of starting new companies, it all adds up to a troubling outlook for the US's ability to to retain talent and foster innovation," the Hired report stated.

It cited research from last year showing that the U.S. will have be short 1.1 million STEM workers by 2024 a problem that could be worsened if it becomes more difficult to bring new talent to the U.S.

'Canada is uniquely positioned': Innovation minister

But what is a threat to the U.S.'s dominance of the industry is an opportunity for Canada. Successive governments have been working for years to attract Silicon Valley talent to Canada, including the introduction this past June of a "fast-track" visa for tech talent.

"In a world where people are becoming more and more inward, where there is a rise in populism, there's a lot of Islamaphobia, a lot of xenophobia, there's a lot of anti-immigrant sentiment, Canada is uniquely positioned," innovation minister Navdeep Bains said last month.

Learn about Donald Trump's proposal to slash the number of immigrants coming to the U.S.:

A study from 2016 found Canada is facing a looming tech talent shortage. The country will create 218,000 tech jobs by 2020, but will not graduate enough students to fill them. Canada currently graduates some 29,000 tech students per year, short of the 43,000 needed to fill upcoming jobs.

The Hired survey also found that there's been a steep decline in U.S. companies' interest in hiring foreign workers. Hired keeps track of interactions between employers and some 1.5 million job-seekers on its platform, and found a 37-per-cent decline in the number of interview offers being made to workers from outside the U.S. in the first quarter of this year.

More from HuffPost Canada:

That decline is likely due to the uncertainty about whether U.S. companies will be able to hire foreign talent in the future, Hired CEO Mehul Patel told Recode.

"Like with Brexit, any time there's a big change at the government level, people are reluctant to make hires they can't keep," Patel said.