(CNN) — A British-operated cruise ship left stranded in the Caribbean when people aboard became sick with coronavirus has finally docked in Cuba after a fraught search for a port that would accept it.

The MS Braemar arrived in Mariel, west of Havana, early on Wednesday, with passengers expected to be transferred to airplanes for transport home to the UK on the same day.

Fred Olsen Cruise Lines, which operates the vessel, confirmed four aircraft had landed in Cuba ready for the rescue operation. The first flight was set to depart at 6 p.m. local time.

The news follows a frantic few days in which the MS Braemar searched for a place to dock, following refusals from several ports in the Caribbean.

Five people aboard the cruise ship tested positive for the virus, according to a statement from Fred Olsen Cruise Lines.

A further 28 passengers and 27 crew members, including a doctor, are in isolation after displaying symptoms. The number has been rising over the past few days.

There are 682 travelers and 381 crew members on board.

"Humanitarian concerns"

A diplomatic source in Cuba told CNN earlier that the communist country "comprehends the difficult situation these passengers find themselves in."

The country said it allowed the Braemar to dock out of "humanitarian concerns" and the need for "a shared effort to confront and stop the spread of the pandemic."

Earlier this week the Braemar was allowed to anchor about 25 miles offshore in the Bahamas to be resupplied with vital food, fuel and medication.

Related content Coronavirus-hit cruise ship in diplomatic scramble to find somewhere to dock

The passengers on the Braemar are mostly British, but also include Canadian, Australian, Belgian, Colombian, Irish, Italian, Japanese, Dutch, New Zealand, Norwegian and Swedish citizens.

All guests will be flown back to the UK to land at London's Heathrow Airport. Any guest unable to fly due to illness will be offered support and medical treatment in Cuba.

Three of the flights will be operated by British Airways. The third has been arranged via the UK's Foreign and Commonwealth Office and is designated for passengers who have tested positive for coronavirus or displayed any flu-like symptoms, and their companions. This flight will head to Boscombe Down, a military base west of London. Medical professionals will also be on board.

Earlier in the voyage, Keith Livingstone, whose wife Suzanne is on board, told CNN he'd been keeping in contact with her as much as possible during the uncertainty, and despite inconsistent internet connection.

"Whilst spirits are high the lack of information and any decision as to what may happen is beginning to concern," he told CNN from Northern Ireland. "The crew from the captain down have been fantastic by all accounts but they seem to be as much in the dark as anyone.

"The lack of information is leading to speculation, which leads to rumors, which then become fact to some."

Related content Multiple cruise ships are left stranded as coronavirus cases increase

Suspension of operations

On March 15, Peter Deer, managing director at Fred Olsen Cruise Lines, said the company had "acted on the best advice available" when it boarded passengers in the Dutch Caribbean island of St Maarten on March 2.

"No one who joined the ship declared illness, and no passenger had traveled to a high-risk area nor been exposed to anyone with Covid-19 coronavirus," he said.

"Anyone remaining on the ship had been in the Caribbean for at least 14 days and there had been no known instances of the virus in the region."

Fred Olsen Cruise Lines said that once all ships currently at sea return home, the "cruise operation will then pause all ocean cruise operations" until May 23.

Related content Major cruise lines suspending operations at US ports for 30 days over coronavirus pandemic

Meanwhile, the British officials expressed gratitude to the Cuban authorities.

"On the issue of cruises, we've been working intensively with the Cuban authorities [...] to ensure that all of the British nationals are able to return quickly and safely to the UK [...] within the next 48 hours," UK Foreign Secretary Dominic Raab said.

"We are very grateful to the Cuban government for swiftly enabling this operation and for their close cooperation to make sure it could be successful."