President Donald Trump meets with Canadian Prime Minister Justin Trudeau in the Oval Office of the White House, Thursday, June 20, 2019, in Washington. (AP Photo/Evan Vucci)

TORONTO (AP) — The U.S. and Canada have agreed to temporarily close their shared border to nonessential travel, President Donald Trump made that announcement Wednesday on Twitter as the two nations work to stem the spread of the coronavirus pandemic.

Trump says the decision will not affect the flow of trade between the countries. Trump writes that “We will be, by mutual consent, temporarily closing our Northern Border with Canada to non-essential traffic.”

Both countries are eager to choke off the spread of the virus but also maintain their vital economic relationship. Canada relies on the U.S. for 75% of its exports. About 18% of American exports go to Canada.

Copyright 2020 Nexstar Broadcasting, Inc. All rights reserved. This material may not be published, broadcast, rewritten, or redistributed.