TRIPOLI (Reuters) - All the foreign journalists who were held in a Tripoli hotel for days by armed Gaddafi loyalists left it unharmed on Wednesday.

Representatives of the International Committee Red Cross came to the Rixos Hotel, arranged for them to leave and provided transport away from the hotel.

Some 35 foreign correspondents, including myself and two other Reuters journalists, and at least two foreign politicians had been trapped for five days in deteriorating conditions as food and water supplies ran low in the once-opulent hotel.

While opposition forces control large parts of Tripoli, fighting continued as forces loyal to Muammar Gaddafi bombarded areas in the center of the capital, including around the hotel.

The Rixos, just south of Tripoli city center, appeared to be one of the few parts of the city not under rebel control.

The Gaddafi government had used the hotel to house foreign reporters who flocked to Tripoli since Libyans rose up against his rule in February.

However, instead of being able to report freely, we were prohibited from venturing out of the hotel on our own. When we did leave, government minders hovered nearby during interviews and coached residents on their answers.

The government ferried us from pro-Gaddafi rallies and showed us sites where NATOairstrikes had killed civilians.

The journalists relied on the government for transportation faced daily accusations, including that we were spies.

(Reporting by Missy Ryan and Leon Malherbe; Writing by Richard Valdmanis)