TORONTO — This was not how Bob Slack expected his sojourn in Winter Haven, Fla., to end.

For 21 years, he and his wife have left their home in Athens, Ontario — some 75 miles south of Ottawa — to spend their winters in warmer places, just like hundreds of thousands of other “snowbirds.” The couple arrived in Florida in November and planned to return to Canada late next month.

Now they and many others are scrambling to get home after Canada and the United States announced Wednesday that they had agreed to close their 5,500-mile border — the world’s longest land boundary — to nonessential traffic in an effort to block the novel coronavirus.

Slack said his family had urged him to come back before the announcement, as the number of cases of the deadly virus in Florida ticked upward. He had almost decided to leave, “to keep peace in the family,” he said, but news of the partial border shutdown provided a “push.”

“Once we cross the border, we’ll be relieved,” he said.

The restrictions, which kick in at midnight, have not only upended travel plans but also brought confusion and angst to closely intertwined border communities.

Some 200,000 people and more than $1.6 billion in goods traverse the U.S.-Canada border each day. The boundary has not been closed since the United States unilaterally shuttered it after the Sept. 11, 2001, terrorist attacks — a days-long closure that led to crippling lines.

Canadian Prime Minister Justin Trudeau announced the closure of Canada’s borders to most foreign nationals Monday but exempted U.S. citizens, citing the “level of integration of our two economies.” The move drew criticism, including from British Columbia’s health minister, who noted a surge of cases in neighboring Washington state.

Trudeau and President Trump announced the partial border closure two days later. The restrictions, which will last for at least 30 days, will allow the flow of commercial goods and trade to continue and also exempt travelers crossing the border for medical purposes, to study or to work. Those traveling for tourism and recreation will be barred.

Asylum seekers who try to enter Canada irregularly from the United States will also be sent back as part of a temporary new agreement between the two countries, Trudeau told reporters outside Rideau Cottage in Ottawa, where he has been in isolation since his wife tested positive for covid-19, the disease caused by the novel coronavirus, last week.

The measures make no mention of specific documents needed to prove business travel. Analysts say much could depend on how individual border agents interpret them, leading to uneven implementation.

Eric Miller, president of the Washington-based Rideau Potomac Strategy Group, expects some “bumpy moments.”

Chrystia Freeland, Canada’s deputy prime minister, urged travelers to have “a little bit of patience and understanding.”

U.S. and Canadian citizens who are abroad will be allowed to return home, even after the measures are implemented — meaning Slack didn’t have to rush to return to Canada before midnight Friday.

Evan Rachkovsky, a spokesman for the Canadian Snowbird Association, said many were hastening to get home after some insurance providers advised clients their coverage will end in 10 days. Others, he said, were struggling to find flights after several airlines curtailed service.

Bill Blair, Canada’s public safety minister, said Friday there has already been “a significant decline” in cross-border travel since Wednesday’s announcement. As of Friday afternoon, there was no delay for passengers at most crossings, according to an online tracker updated by Canada Border Services Agency.

Jim Diodati, mayor of Niagara Falls, Ontario, told CTV News this week that the city had become a “ghost town” and that lines at the border were virtually nonexistent.

But at the crossing between Coutts, Alberta, and Sweet Grass, Mont., wait times to get into Canada stretched to almost an hour Friday.

Will Harty, the owner of the Double Tree Inn in Coutts, worries the partial border closure will hurt the motel he has owned for two decades.

“I hope they get this taken care of and it ends and things go back to normal,” he said.

Jeff Butler is the manager of Thousand Islands Duty Free in Ontario, across the border from Alexandria Bay, N.Y. He said while he has seen a “steep reduction” in travel from Canada to the United States this week, traffic in the opposite direction has been high.

Butler said a drop in tourism as a result of the closure is “certainly a concern,” but his store will remain open to serve commercial traffic, albeit with reduced hours.

In Blaine, Wash., a seaside border town alongside neighboring White Rock, British Columbia, public officials and business owners have been bracing for the restrictions.

The downturn in cross-border traffic has sent year-over-year sales plummeting about 90 percent in the past two weeks at Mike Hill’s Chevron station, where most business comes from Canadians buying cheaper U.S. gas.

“When you shut that vein off, all the gas stations are empty,” he said.

There were no signs of last-minute fill-ups Friday. Hill will keep the pumps on for now, but he has closed the store at the historic gas station for the first time in 112 years due to a lack of business.

Blaine has a thriving cottage industry of mailbox stores for Canadians living in the Vancouver metro area who take advantage of cheaper U.S. prices on e-commerce goods and patronize Amazon marketplace sellers who do not ship to Canada.

Inside 5dpackages, Erin Carr was working reduced hours behind the counter. She saw only six people in six hours. Usually, there is a line waiting for the store to open.

Carr is engaged to a Canadian who lives on the U.S. side. They expect to postpone their June wedding.

“With the border being closed, it probably won’t be for a little while,” she said. “His family is all in Canada.”

Slack said it would take about 21 hours to drive home. He and his wife planned to stay somewhere overnight en route.

Amid all the chaos, he noted a silver lining.

“Traffic is good,” he said. “Traffic is very good.”

Scruggs reported from Blaine, Wash.