More than two dozen passengers on a cruise ship docked near New York City have been tested for the new coronavirus, state officials said Friday, and four have been hospitalized.

Personnel from the Centers for Disease Control and Prevention boarded the ship to test 27 passengers "who recently traveled from mainland China," New Jersey Gov. Phil Murphy said Friday.

"After being assessed by the CDC, 23 of those passengers were cleared and four individuals are being evaluated at an area hospital," he said.

The ship, Royal Caribbean's Anthem of the Seas, is docked in Bayonne, New Jersey, about 15 miles from New York City.

The four hospitalized passengers are a family that was recently in mainland China but not Hubei province, the epicenter of the outbreak, the CDC said in a statement, adding that two were ill when CDC personnel boarded the ship.

At least two passengers were removed from the ship on stretchers, footage of the scene shows.

Royal Caribbean said the passengers had not been in China since Jan. 26, which might put them past the 14-day incubation period. The company said one of the passengers had already tested positive for influenza A.

"We appreciate the CDC's abundance of caution and their partnership," the company said. "None of the four guests showed any clinical signs or symptoms of coronavirus while they were onboard our ship."