Updated

By Emma Graham-Harrison

BEIJING (Reuters) - Thorough planning enabled Beijing Olympics organizers to stave off threats to the 2008 Games ranging from bioterrorism to unsafe sex, a joint Chinese-United Nations report said on Wednesday.

Security forces dealt with several potential biological, chemical and explosive attacks, including an incident in which packages containing white powder were sent to five unidentified embassies in Beijing, the report said.

Tests later proved the powder was harmless, a Beijing Health Bureau official said, adding that information about the previously unpublicized scare had come from "anti-terrorism" security forces.

The other episodes involved plans by "overseas terrorists" to target Olympic venues, explosives on a plane at Beijing airport and rumors of an explosion on the metro, the report said, without giving further details.

"The Health Legacy of the 2008 Olympic Games," launched by the World Health Organization and the Beijing Olympic City Development Organization, assessed the long-term impact of the Beijing Games and drew lessons for future mass events.

The comprehensive survey touches on everything from terror threats to problems keeping bacteria out of water pipes, the difficult struggle with Beijing's often smoggy air, and sexual health in the Olympic village.

Authorities prepared half a million standard-size condoms for free distribution in the capital during the Games, with 100,000 for the Olympic village alone, most of which were snapped up.

"This implies that up to 90,000 potentially risky sexual encounters were protected and made safe," the report said, but suggested future organizers also prepare large size condoms.

It did not say if there had been complaints, but perhaps not everyone availed themselves of the smaller condoms. Ten women asked for pregnancy tests at an Olympic village clinic during the last days of the games, the report added.

TERRORISM FEARS

After the Games, China released a wanted list of eight people it said had threatened terror attacks on the Olympics in pursuit of independence for the restive frontier region of Xinjiang.

Two of the suspects had tried to bomb a "large market place where many Chinese business people gather" before the Games opening ceremony, the police said at the time.

Police said all eight, who were members of China's mainly Muslim minority Uighur group, belonged to the East Turkestan Islamic Movement, which the United Nations listed in 2002 as a terrorist organization with links to al Qaeda.

Resource-rich Xinjiang, strategically located on the borders of Central Asia, was rocked by three attacks before and during the Games, although Beijing itself was quiet.

Sixteen armed police were killed in a bomb and knife attack in the oasis city of Kashgar days before the opening ceremony. Eleven people died the next week in a series of supermarket bombings in Kuqa, in Xinjiang's south, and three security guards were stabbed to death at a roadside checkpoint near Kashgar.

Many of Xinjiang's 8 million Uighurs chafe at China's strict controls on religion and resent the influx of Han Chinese migrant workers and businesses.

(Additional reporting by Liu Zhen; Editing by Paul Tait)