MIAMI—Cruise lines have never had a cleanliness problem this big.

In 2017, cruise lines failed their sanitation inspections at the highest rate ever since the Centers for Disease Control and Prevention’s Vessel Sanitation Program started holding cruise ships to its Operations Manual guidelines in 1990.

Fifteen ships earned failing scores last year, a figure that dwarfs the average failure rate of about two to four ships a year, a Miami Herald analysis of the CDC’s historical inspection data found. The only year that comes close to 2017’s all-time-high figure is 2013, with 10 failures. In 2016, just four ships flunked their inspections, and from 2009 to 2011, there was only one failure a year.

In 2017, the failures included five cruise ships from Doral-based Carnival Cruise Line, one from Miami-based Norwegian Cruise Line, one from Miami-based Oceania Cruises and one from Deerfield Beach-based Bahamas Paradise Cruise Line. A Caribbean ferry, Ferries Del Caribe’s Kydon, failed its inspection twice.

Carnival has been quick to respond, adding staff training and changing procedures even though they face no legal penalties. Still, the line says, the failures correspond with a greater emphasis on administrative details during inspections that don’t necessarily reflect a ship’s cleanliness.

The increase in incidents follows a significant increase in the size of the global fleet. In 2017, the number of cruise ships increased by about 6 percent from nearly 450 ships in 2016. But the spike in failures is still unusual, said Ross Klein, a professor at the School of Social Work at Memorial University of Newfoundland in Canada, who tracks cruise ship outbreaks, health issues and other factors.

“We can say it’s the worst year, but also the best because it means inspectors are doing their jobs,” Klein said.

There were a total of 255 inspections in 2017, with the majority of ships passing their inspections. Forty-one ships got perfect scores, accounting for about 16 percent of all inspections. The spike in failures, though more elevated than in recent years, still only accounts for 6 percent of all inspections in 2017.

The Vessel Sanitation Program randomly inspects ships that dock at U.S. ports at least twice a year to help control the spread of gastrointestinal illnesses like norovirus. The program first launched in 1975 but didn’t begin to hold ships to its VSP Operations Manual guidelines until 1990.

Vessels are scored on a 100-point scale. A score of 85 or below is considered failing.

All ships cited with violations are required to submit a Corrective Action Report detailing how they corrected the problems; vessels that fail are re-inspected “within a reasonable period of time,” Treffiletti said. But a ship that fails an inspection a second time or a cruise line that has a string of failures faces few legal consequences.