Around 3,700 people are facing at least two weeks locked away on a cruise liner anchored off Japan after health officials confirmed on Wednesday that 10 people on the ship had tested positive for coronavirus and more cases were possible.

While the infected patients were transferred by Japan's coastguard to hospitals on the mainland, the rest of the passengers and crew on board the Carnival Corp ship were placed in quarantine and given health screenings. The 10 cases were among 31 results received so far from 273 people tested, Reuters said.

Passengers on Carnival's Diamond Princess, which had arrived in Yokohama on Monday after a 14-day round trip, will now spend another two weeks on the ship off Yokohama port near Tokyo.

Read alsoUkraine gets German-made rapid test system for new coronavirus

They took to social media to detail their predicament, posting photos of officials in masks and gowns conducting health checks, room service meals and empty corridors and decks.

British passenger David Abel said passengers were confined to their cabins on Wednesday morning, with staff delivering food room-by-room.

Carnival's Princess Cruises said quarantined passengers would get free internet and telephone services and the crew was working to keep them comfortable.

The ship was caught up in the global coronavirus epidemic after an 80-year-old Hong Kong man tested positive for the virus after disembarking in Hong Kong on January 25. The man had joined a shore excursion in Kagoshima, southwestern Japan, on January 22, local media reported.

He was believed to have been in close contact with 36 passengers, Kyodo news reported, citing Japan's health ministry. Two of those people are among the 10 who have already tested positive, Kyodo said.

Health Minister Katsunobu Kato said officials would continue to monitor the remaining passengers and crew for the potential development of symptoms.

None of the 10 infected people – three each from Japan and Hong Kong, two Australians, one American and one Filipino crew member – had severe symptoms, public broadcaster NHK reported.