Amazon's inclusion of Canada's largest city on a list of 20 finalists for a massive new campus could escalate tensions between the tech giant and U.S. President Donald Trump.

The company said on Thursday that Toronto and 19 U.S. locales made the first cut in a contest to find a second headquarters where it promises to invest $5 billion US and create 50,000 jobs.

As it reviews Toronto, Amazon must weigh whether advantages including Canada's open immigration policy, top technical schools and universal healthcare outweigh any potential blowback from Trump, who has heavily pressured U.S. companies to invest domestically.

"There could be consequences politically for making a decision to invest outside of the U.S.," said Shauna Brail, director of the University of Toronto's urban studies program.

Trump has already criticized Amazon and its founder Jeff Bezos, who also owns the Washington Post, in tweets suggesting the U.S. Postal Service ought to raise shipping rates for the online retailer and describing the newspaper as a purveyor of fake news.

Amazon said Thursday it expects to make a decision this year. It is unclear how choosing Toronto might affect worsening trade relations between Canada and the U.S. Other bidders include Washington, D.C., and two surrounding communities: Montgomery County, Maryland and Northern Virginia.

"The international politics is for Amazon to deal with," said Toby Lennox, CEO of Toronto Global, which submitted the bid for Toronto and surrounding cities with the support of provincial and federal governments. "We are just going to put forward our best offer possible."

Canadian federal officials declined to discuss what steps the government might take to campaign on behalf of Toronto or comment on how that might affect relations between Canada and the United States.

"Canada is a beacon of stability, reliability and openness," Economic Minister Navdeep Bains said in an emailed statement.

"We offer a low-risk, business-friendly environment with the lowest business taxes and costs in the G7." Amazon is already expanding in one major Canadian city. In November unveiled plans to open a second corporate office in Vancouver, doubling staff to 2,000 by early 2020.

The company disclosed that it was considering boosting investment in Canada just a day after Apple said it would boost investment in the United States. The iPhone maker promised to open a new U.S. campus, hire 20,000 people and spend $30 billion in a five-year U.S. investment plan.

The search for a second North American headquarters after Seattle set off a frenzied competition, with some 238 initial submitting applications, offering incentives including big tax breaks.

Toronto's bid shied away from promising tax breaks, while New Jersey offered $7 billion in financial incentives for Amazon to choose Newark.

Atlanta's suburb of Stonecrest offered 345 acres of industrial land to create a new city called Amazon, making Bezos mayor for life.

Besides Toronto, the complete list of cities still in the running consists of: