A cruise ship turned away from two ports over fears of coronavirus actually harbored a case of the flu, its owner says.

MSC Cruises said Friday morning that its ship got a “clean bill of health” from Mexican officials and that passengers would soon disembark, two days after the company criticized authorities in Jamaica and the Cayman Islands for rejecting its cruise liner. Mexico agreed Thursday to let the ship dock at the island of Cozumel.

“We cannot act with discrimination,” Mexican President Andrés Manuel López Obrador said, according to the Associated Press. “Imagine if a ship arrived and it wasn’t even allowed to dock, and they were told, ‘Keep going on your way, see where you can dock.’ That is inhuman.”

The MSC Meraviglia was the latest cruise ship ensnared by worries about a now-global coronavirus outbreak after hundreds of people on the Diamond Princess cruise ship off Japan fell ill. Jamaican authorities had blocked the ship while expressing concerns about a crew member with symptoms including a cough and fever and a “travel history to a country of interest relating to the COVID-19,” the disease caused by the coronavirus. Officials on Grand Cayman also would not let people disembark, citing an “abundance of caution.”

But the cruise company says that the ship’s medical records showed just one case of “common seasonal flu” and that the illness struck a crew member whose travel history did not include territories hit by coronavirus or subjected to “international health restrictions.” No case of coronavirus has been reported on any ship in the company’s fleet, it added, criticizing Grand Cayman authorities for blocking the ship “without even reviewing” the medical records.

The “disappointing decisions” from officials in Jamaica and Grand Cayman were “born out of fear, not best medical practice,” MSC Cruises said in a statement Friday. “This led to unnecessary and unjustifiable anxiety, not only for our passengers and crew on board, but right across the Caribbean’s tourism sector, and possibly even further beyond.”

All 4,580 guests on board have been promised a full refund of their cruise fares “due to the disruptive nature of their vacation,” the company said. Guests will have Friday to spend on shore on Cozumel before the ship returns to Miami on Sunday.

The ship departed Feb. 23 from Miami for a 15-day trip, according to MSC Cruises’ website.

Late Wednesday, the governor of the Mexican state of Quintana Roo said the Meraviglia ship was not authorized to dock in Cozumel and should be reviewed by health officials. However, López Obrador reversed course Thursday and said that the cruise ship would be able to stop.

López Obrador also suggested that passengers would be able to disembark, but the Quintana Roo governor, Carlos Joaquín, quickly tweeted Thursday that “no authorization has been given” for people to leave the ship.

MSC Cruises said its ship arrived at Cozumel’s west coast about 9:30 p.m. Wednesday but waited for winds to die down before entering the port, as local authorities had cleared it to do.

Mexican health authorities boarded the vessel Thursday and did further testing on the sickened crew member “out of an excess of precaution,” spokeswoman Alyssa Goldfarb told The Post in an email. They also tested a “young female guest who has since developed mild symptoms” for flu, Goldfarb said.

The crew member with common seasonal flu was isolated from others aboard as soon as he showed symptoms, according to MSC Cruises. Goldfarb said the crew member is now symptom-free.

Concerns about coronavirus on cruise ships escalated as more than 700 people — among the roughly 3,700 passengers and crew members aboard — were infected on the Diamond Princess, which was quarantined for two weeks in a Japanese harbor. That meant the ship had the most cases of any place outside China, where the outbreak began in the city of Wuhan and sent millions into an unprecedented lockdown, the Associated Press reported.

The MSC Meraviglia was not the first ship to be rebuffed by port after port leery of coronavirus spreading in their communities. One passenger spent her extra time on Holland America’s waylaid MS Westerdam live-tweeting.

“Here’s a science-fiction plot line for ya,” Christina Kerby wrote. “Amidst a global epidemic that wipes out the earth’s population, it’s up to the people aboard one cruise ship — the only safe place on earth — to repopulate the planet. **Passengers onboard the #Westerdam begin eyeing each other nervously**”

The ship’s 1,455 passengers eventually disembarked in Cambodia, as Holland America thanked the country for its “willingness to welcome us with an open mind and make decisions based on facts.”

One of the Westerdam guests subsequently tested positive for the coronavirus, although officials in Malaysia said the passenger later tested negative, according to the New York Times.

Kim Bellware contributed to this report.

Read more: