A federal judge has granted a request to block temporarily the transfer of several dozen people who probably are infected with the new coronavirus from Travis Air Force Base in Fairfield, where they have been under quarantine, to a closed facility in Orange County.

The judge agreed Friday with the city of Costa Mesa, which sought to stop about 50 people — recently evacuated passengers from the Diamond Princess cruise ship in Japan — from moving to the former Fairview Developmental Center.

In its request to the court, the city said it was never notified of the “11th-hour plan ... to introduce people with a deadly and highly communicable disease” to Fairview. The city described the facility as a “dilapidated complex surrounded by residential neighborhoods ... with no security measures to keep quarantined individuals from the residents of Costa Mesa.”

The transfer plan, the city argued, would “wreak havoc on the local economy, endangering local businesses and starving local governments of tax revenue.”

The temporary order will remain in place until Monday, when another hearing is scheduled.

Costa Mesa Mayor Katrina Foley said in a statement that her “top priority is the safety and security of this community.” The city, Foley said, “was not part of the process that led to Fairview’s consideration for this use and has not been thoroughly advised.”

Nearly 78,000 people have been infected by the coronavirus, and more than 2,300 have died, the vast majority in China. But the United States has seen only isolated cases, all of them linked directly to China. Last month, an Orange County resident was reported as the first case of coronavirus in California. The person was treated at a hospital and has been released.

Public health officials say the risk of infection to the general public remains low.

There have been 35 cases of COVID-19 — the illness caused by the virus — reported in the U.S., including 18 confirmed cases among the evacuated cruise ship passengers. Five of those 18 people are being treated in isolation at Northern California hospitals. Many other former cruise passengers tested positive for the virus while in Japan, but are being retested by the Centers for Disease Control and Prevention.

The transfer of quarantined people from Travis to Costa Mesa was to have begun this weekend. About 300 passengers from the cruise ship, which had been held at a dock outside Yokohama, were evacuated to Travis and another military base in Texas last Sunday. They are expected to remain under quarantine for 14 days.

After Costa Mesa sought the injunction, state health officials said the Fairview Developmental Center was “one of the possible locations” for isolating people testing positive for COVID-19.

Anyone testing positive must be transferred from Travis, the California Health and Human Services Agency said Saturday. “Many are not sick enough to need hospital care but must still must be isolated,” the agency said.

The state said federal authorities, who are in charge of the quarantine program, would “provide robust security to ensure the safety and health of the surrounding community” in Costa Mesa.

The Orange County Health Care Agency, the county’s public health department, said it supports the temporary halt.

“As the local health department, it is our hope that we can engage in a more thoughtful and robust collaboration with our colleagues at the state and federal level to ensure the health and safety of Orange County residents is protected and next steps are clearly communicated to the public,” Dr. Nichole Quick, county health officer, said in a statement.

At a press conference Saturday, Michelle Steel, chairwoman of the Orange County Board of Supervisors, vowed to block the transfer.

“We don’t need any more people,” she said, referring to the previous patient treated in the county. “Our public health safety is the most important part. ...We’re going to work together and we’re going to stop this.”

Foley, the Costa Mesa mayor, said at the press conference that the city is exploring all legal options, but the federal government could potentially override state and local government authority.

In its request to the court, Costa Mesa called itself a “dense commercial and cultural center (with) one of the world’s highest-grossing shopping centers, South Coast Plaza ... a tourist destination for international high-end shoppers.”

Chronicle staff writer Roland Li contributed to this report.

Steve Rubenstein is a San Francisco Chronicle staff writer. Email: srubenstein@sfchronicle.com Twitter: @SteveRubeSF