San Francisco Mayor London Breed and city health officials on Wednesday ordered the cancellation of all large gatherings in the city in response to the growing threat of the coronavirus — on a day that saw sweeping changes across the country including a ban on travel from Europe and the suspension of the NBA season.

The city’s move was aimed in part at suspending basketball games and other events at Chase Center and preceded the NBA’s dramatic decision to halt all games until further notice amid the outbreak.

San Francisco’s new move to curb the virus came as the World Health Organization deemed the coronavirus a pandemic on Wednesday and Italy tightened its lockdown, ordering nearly all businesses to close.

In the wake of those developments, President Trump addressed the nation Wednesday evening to announce that travel from Europe to the U.S. will be suspended for 30 days, starting Friday. The move, however, does not affect American citizens and permanent residents, the White House said. Trump said the restrictions will not apply to the United Kingdom, and that he is seeking payroll tax relief for Americans and aid to businesses.

Cities and states throughout the nation were ratcheting up containment measures Wednesday after a top U.S. health official, Dr. Anthony S. Fauci, said the outbreak “is going to get worse.”

Confirmed cases grew in the Bay Area and California. California had 190 confirmed coronavirus cases as of Wednesday afternoon, including 108 in the Bay Area and 14 in San Francisco. Diagnoses have been rising sharply in the Bay Area: Less than a week ago, on March 6, there were around 30 confirmed cases in the region.

To help tame that trend, San Francisco health officials’ order prohibiting indoor and outdoor public gatherings of 1,000 or more people will last at least two weeks.

City officials began directly notifying dozens of venues on Wednesday about the new mandates to ensure compliance.

“We know that this order is disruptive, but it is an important step to support public health,” Breed said in a statement. “This order mirrors actions being taken by other local governments and is informed by the Centers for Disease Control and Prevention guidelines. We know canceling these events is a challenge for everyone.”

Supervisor Aaron Peskin, who had urged the Warriors to close Chase Center in recent days, said Wednesday of the directive, “It was always a question of ‘when,’ and not ‘if.’ We’re all in this together, and we have an imperative to stop transmission of this virus.”

The city has previously recommended event organizers cancel large gatherings, but Wednesday’s mandate now carries the legal weight of fines or even jail time for noncompliance.

“The virus needs people to spread. It jumps from person to person, so by reducing the opportunity for that to happen, we can effectively slow the spread,” said San Francisco Health Director Dr. Grant Colfax in a statement.

The health order also “strongly recommends” following “social distancing” protocols, including “canceling, rescheduling, or not attending” events with more than 250 attendees. Organizations that serve high-risk populations should cancel gatherings of more than 10 people, the order states.

Through March 21, all events at Chase Center will be canceled or postponed due to the public-gathering ban.

The San Francisco Giants also announced Wednesday they will not host the Oakland A’s in an exhibition game at Oracle Park previously scheduled for March 24.

The move to ban large gatherings builds upon directives that Colfax issued Friday that canceled large city-sponsored events. He issued recommendations that private entities, like sports and concert organizers, follow suit. But Wednesday’s order mandated under city law that privately sponsored events be canceled as well.

Colfax said that “banning events has public health benefits,” but added there was no critical, scientific threshold for the size of events that would guarantee the illness isn’t spread.

“There is no magic number,” said Rachael Kagan, a spokeswoman for the health department.

City officials said that the two-week moratorium on large gatherings was prompted in part because some large venue owners ignored the health department’s advice to cancel events.

The recommendations “weren’t necessarily taken by everyone,” Breed said at a news conference Wednesday. “So we decided to go a step further.”

Oakland officials followed San Francisco’s lead Wednesday. They declared a state of emergency and canceled all gatherings of 1,000 or more people at city-owned properties.

Washington state Gov. Jay Inslee announced that state — which has been hit hard by the coronavirus — would impose a ban on gatherings of 250 or more people in King, Snohomish and Pierce counties in an effort to slow the spread of the virus.

Some San Francisco theaters said they planned to move ahead with scheduled performances, but with a planned reduction in the number of patrons in attendance to comply with the 1,000-person cutoff.

A spokeswoman for the Curran said in an email that “in compliance with the City of San Francisco’s mandate, the Curran Theater has reduced its capacity to 1,000 persons and is contacting patrons to voluntarily exchange tickets for any performance that exceeds this capacity. All San Francisco performances of “Harry Potter and the Cursed Child” will continue as scheduled with this reduced capacity until further notice.”

The full economic impact of the mandated closures is still being assessed. But City Controller Ben Rosenfield presented some stark preliminary figures to the city’s Budget Committee on Wednesday. The travel and hospitality sectors have been particularly hard-hit, Rosenfield said, as concerns over the virus eat into the city’s tourism and business-travel economies.

All conventions at the Moscone Center have been canceled until mid-May, resulting in the loss of 235,000 hotel-room nights. The hotel industry employs around 25,000 people in the city.

Rosenfield said he expected the fallout to increase in severity in more sectors, including restaurants. There are currently no exact estimates for the city’s potential revenue losses, but Rosenfield said they could be in the tens of millions of dollars just for the quarter.

PJ Johnston, a spokesman for the Warriors, said the organization had not yet finished crunching the numbers on potential financial losses stemming from the mandated closures. He added that the situation was especially painful “for all the workers, vendors and small-business partners who count on events at Chase Center.”

San Francisco Chronicle staff writer Jill Tucker contributed to this report.

Dominic Fracassa is a San Francisco Chronicle staff writer. Email: dfracassa@sfchronicle.com Twitter: @dominicfracassa