The Caribbean nation of St. Lucia quarantined a cruise ship on the island for several days after identifying a confirmed case of measles on board, a health official said.

Passengers and crew members aboard the large ship were not permitted to leave, Dr. Merlene Fredericks-James, the nation’s chief medical officer, said on Tuesday. The ship remained moored at St. Lucia until around midnight Thursday, when it departed to the west of the island.

The highly infectious disease, which can be mostly prevented by a common vaccination, is in the midst of its largest outbreak in a quarter-century in the United States, with more than 700 cases reported.

“Because of the risk of potential infection, not just from the confirmed measles case but from other persons who may be on the boat at the time, we thought it prudent to make a decision not to allow anyone to disembark,” she said in a statement.