A woman spins on a bike. (Getty Images) (Peter Cade/Getty Images)

When a spin studio opened in the Canadian city of Hamilton in July, its owners took several measures to prevent an outbreak of the novel coronavirus.

They removed about half the studio’s stationary bikes to allow room for social distancing, Elizabeth Richardson, the city’s medical officer, said Tuesday. They ramped up sanitation measures. And riders were asked to wear their masks into the studio and remove them only while exercising, in accordance with local rules.

Now, despite appearing to have complied with public health regulations, at least 61 people linked to the studio have tested positive for the coronavirus.

“They had done all sorts of things to remove the potential for spread,” Richardson told reporters. “Unfortunately, gyms are a higher-risk place because of the fact that generally people are taking off their masks, they’re breathing at a higher rate.”

Although Hamilton requires masks to be worn in most public settings, the law includes an exemption for anyone “actively engaged in an athletic or fitness activity.” In keeping with that policy, the studio, SPINCO, allowed riders to remove their masks once clipped into their bikes, and told them to cover up again before dismounting.

In a recent Instagram post, SPINCO’s owners said that they had been “hesitant” to reopen after getting the green light in July and would not resume classes “until it is safe to do so.” Health officials have said that the studio is temporarily closed and cooperating fully with the investigation.

“We took all the measures public health offered, even added a few, and still the pandemic struck us again!” the owners wrote. SPINCO has more than a dozen locations across Canada.

Why German researchers held a large indoor concert during the pandemic

The leaders of Britain, France, Canada and Israel warned their citizens to prepare for a difficult fall and winter as covid-19 infections increase. (Video: The Washington Post)

As of Tuesday, 44 cases linked to specific classes were detected, Richardson said. An additional 17 instances of “secondary cases” were found among other contacts.

The city will reexamine gym protocols, Richardson added Tuesday, but in the meantime, “what seems to be the case is that you need to wear that mask” even though government guidelines do not strictly require it.

“It’s still a good idea to do it, in terms of keeping others safe,” she said.

People should also avoid “classes where you’ve got that kind of yelling or coaching over music.”

She declined to use the term “superspreader” to describe the event but said it is a “very large outbreak.”

“It is concerning that it is extended beyond the initial cases who were related to the classes but gone into of course their household contacts and other contacts,” she said. “We continue to look at what does it mean, what do we need to understand about exercise classes?”

Barbara Yaffe, Ontario’s associate chief medical officer of health, told reporters on Wednesday that the province is reviewing its recommendations for spin studios and other gyms in response to the outbreak.

“Even though they followed guidelines, there was obviously significant transmission,” Yaffe said, “so I think we do need to review the guidelines and that’s in process.”

The outbreak that didn’t happen: Masks credited with preventing coronavirus spread inside Missouri hair salon

The outbreak offers further evidence of the dangers of people gathering indoors without masks, as health experts warn that cases could spike in the coming months as winter weather sets in and outdoor gatherings and exercise classes will be harder to maintain.

In August, South Korea confirmed dozens of cases linked to a single Starbucks in the city of Paju where many customers did not wear masks. The store employees, who wore masks, were not infected. The outbreak prompted Starbucks to limit its indoor seating in the country and encourage masks among patrons.

In other instances, mask usage has been credited with preventing potential outbreaks. In May, after the reopening of a hair salon in Missouri that required masks, two stylists — who had worked with more than 100 clients — tested positive for the virus. But masks were required inside the salon, and of the several dozen customers who opted to be tested after their potential exposure, none of them tested positive.

Amanda Coletta in Toronto contributed to this report.

This report has been updated.

Coronavirus: What you need to know

Covid isolation guidelines: Americans who test positive for the coronavirus no longer need to routinely stay home from work and school for five days under new guidance planned by the Centers for Disease Control and Prevention. The change has raised concerns among medically vulnerable people.

New coronavirus variant: The United States is in the throes of another covid-19 uptick and coronavirus samples detected in wastewater suggests infections could be as rampant as they were last winter. JN.1, the new dominant variant, appears to be especially adept at infecting those who have been vaccinated or previously infected. Here’s how this covid surge compares with earlier spikes.

Latest coronavirus booster: The CDC recommends that anyone 6 months or older gets an updated coronavirus shot, but the vaccine rollout has seen some hiccups, especially for children. Here’s what you need to know about the latest coronavirus vaccines, including when you should get it.