CIVITAVECCHIA, Italy — The five idled cruise ships stretch end-to-end across what was once one of the world’s busiest ports — and that now amounts to a surreal, gleaming white mile of empty pools, buffet restaurants and piano bars. The ships have enough space combined for 26,000 people. For months, no passengers have come aboard.

But after taking refuge here during an unprecedented global cruise stoppage, some of these ships will soon be sailing again, chauffeuring customers on Mediterranean vacation packages amid the pandemic.

Though cruising has been ordered to a halt in the United States, several major cruise liners are trying to restart their business in Europe, with Italy as the epicenter of the effort. One ship, the MSC Grandiosa, will begin a voyage Sunday, the first to restart in the Mediterranean. Several others will follow soon behind. The companies have consulted with scientists, drawn up new safety protocols and received Italian government clearance; MSC Cruises, on its website, says passengers can now “cruise with confidence.”

But it remains unclear how risky it might be for people to climb back onboard and restart an activity that, at the beginning of the pandemic, helped seed the virus around the world and was connected to several dozen deaths.

“We are talking about minimizing the risk, not getting to zero,” said Stefano Vella, a Catholic University of Rome infectious-disease specialist who consulted with the Costa, one major liner that is poised to restart. “Getting to zero is impossible.”

In places like Civitavecchia, a port city that functions as a cruise gateway to Rome, one can see some of the economic distress — barren hotels and restaurants — that cruise companies say will be alleviated by their restart. Italy depends on tourism for 13 percent of its economy, and the cruise industry has been particularly hard hit. Cities like Venice, for the first time in memory, do not have towering cruise ships as part of their skyline.

But people who follow the industry say the logistics of resuming are extraordinary. In Italy, as in much of Europe, the coronavirus case numbers are starting to rise after a summer-long ebb. Cruise companies will have to work around quarantines and other complications that could come from calling in multiple countries.

The companies say they are depending on science to guide their reopening. Royal Caribbean and Norwegian, two of the biggest players in the industry, assembled what they called a “Healthy Sail Panel” of outside experts. The other industry titan, Carnival, recently convened a science summit. Company after company has unveiled plans to upgrade air filtration systems, remove buffet lines, reduce capacity and board passengers at staggered intervals.

“It’s impressive to see how far some of those companies have advanced in a short period of time, because of course they fear for their business,” said Stephan Harbarth, an infectious-disease specialist at the University of Geneva and a member of the panel advising MSC Cruises. Harbarth said that cruise ships face some of the same challenges as nursing homes — a large population in a confined space — but he said he was “optimistic” that cruising could be made safe with rigorous screening and testing.

But recent efforts to relaunch outside of Italy have been rocky. In the South Pacific, on a Paul Gauguin cruise ship with international guests, passengers were confined to their cabins after one person aboard tested positive for the virus. And in Norway, at least 62 people have contracted the virus after two infectious crew members worked on back-to-back Arctic cruises. The chief executive of the Hurtigruten cruise line, Daniel Skjeldam, apologized and said the company had failed to follow its own procedures.

For critics, the missteps are a sign of how difficult it is for the cruise industry to resume. Before the outbreak, Norway-based Hurtigruten had unveiled its own laundry list of safety pledges.

“I don’t think there is any way to have a reasonably safe environment [for cruises] unless there is a vaccine,” said Jim Walker, a Miami-based lawyer who once worked as a defense attorney for the cruise industry and now represents crew and passengers.

Walker said cruise lines are “essentially viewing their customers as guinea pigs, where they’ll put them out there and hope for the best.”

One of major questions facing companies is whether to mandate testing as people get onboard. Companies have so far followed different courses. MSC, for instance, said it will require swab tests at the point of embarkation. But Costa, in laying out its new safety protocols this month, said only that guests would be given health screenings and temperature checks. A Costa spokesman said that the company, which will launch its first cruise Sept. 6, was still considering the possibility of testing passengers, depending on “medical technology and epidemiological developments.”

“The situation is very fluid,” the company said.

Within the industry, there is particular concern about crew members, who tend to live around the world and will have to travel to Europe as the cruises resume. Even as the cruise ships idle, they are still maintained by skeleton crew. The Italian newspaper Il Messaggero reported last week that nine crew members manning two of the vessels in Civitavecchia had tested positive for the virus.

In a statement, the Costa spokesman said the “situation is evolving positively with our crew members.” Only one member was still positive, and none remained aboard.

At the outset of the pandemic, companies faced backlash for their decision to keep sailing even as the seriousness of the virus became apparent. The Centers for Disease Control and Prevention has linked 3,000 confirmed or probable coronavirus cases to cruise ships, along with 34 deaths. In establishing its no-sail order, the U.S. agency said cruise ships pose a greater risk for transmission “than other settings.” In the most notable case, the Diamond Princess cruise ship turned into a de facto isolation ward on the coast of Japan; about one-fifth of the passengers and crew became sick.

The Carnival Corporation, which operates a series of major cruise brands, including Italy-based Costa, said as part of its latest financial reporting that it faces a round of class-action lawsuits claiming negligence from passengers who had contracted or been exposed to the coronavirus aboard. Another suit came from the family of a Carnival Ecstasy passenger who had contracted the virus and died.

Carnival also cited a litany of risk factors to its business, including higher costs because of hygiene-related measures.

“Due to the outbreak of [the coronavirus] on some of our ships, and the resulting illness and loss of life in certain instances, we have been the subject of negative publicity which could have a long-term impact on the appeal of our brands, which would diminish demand for vacations on our vessels,” the company said.

Still, Carnival chief executive Arnold Donald said the company could still be profitable if social distancing measures forced vessels to be at less than 50 percent capacity. He also offered one other reason he was encouraged: Customers still seem to want to get on cruise ships.

“There is a lot of pent-up demand,” Donald said.

Even once cruises restart in Italy, some people will still be forced to wait longer to get onboard; Americans, for example, are barred from entering the European Union for leisure travel.

“I would go this weekend if there was a sailing,” said Stewart Chiron, who runs the website cruiseguy.com and says he has been on 276 cruises, at least 25 of them in the Mediterranean.

In Civitavecchia, most of the people who get on cruise ships are non-Italians, with Americans among the largest group, said John Portelli, general manager of the passenger terminal in Civitavecchia. This week, Portelli offered a tour of the boarding terminal, empty but ready for the inflow, with social distancing floor stickers and plexiglass barriers at check-in counters. Outside the terminal, through the windows, one could see the lineup of cruise ships, a landscape that had been virtually static through the summer.

But a few forklifts were loading supplies to the Costa Deliziosa. And within days, the MSC Grandiosa would leave Genoa and come to Civitavecchia.

“The landscape,” Portelli said, “is about to change.”