Olympics head Jacques Rogge congratulated China for a "dream come true" by hosting the Games and urged athletes to shun doping.
"For a long time, China has dreamed of opening its doors and inviting the world's athletes to Beijing for the Olympic Games," Rogge, head of the International Olympic Committee (IOC), said in a speech at the Games' opening at the Bird's Nest stadium.
"Tonight that dream comes true. Congratulations, Beijing!"
Embarrassed by doping scandals in Athens four years ago, Rogge's IOC has raised the bar for Beijing with more and tougher tests for the 10,500 athletes taking part from 204 countries.
Nobody has tested positive so far in China, though about 20 athletes were kicked off national teams in advance over doping.
"Dear athletes, remember that you are the role models for the youth of the world," Rogge said. "Reject doping and cheating ... Make us proud of your achievements and your conduct."
Steering well clear of the politics and rights criticisms that have dogged China's build-up to the Olympics, Rogge offered a message of solidarity to its 1.3 billion people.
"As one world, we grieved with you over the tragic earthquake in Sichuan Province. We were moved by the great courage and solidarity of the Chinese people," he said of the May quake that killed at least 70,000 people.
"May these Olympic Games bring you joy, hope and pride ... You have chosen as the theme of these Games 'One World, One Dream'. That is what we are tonight."
Rogge gave special thanks to the hundreds of thousands of Chinese volunteers, mainly students, who are shepherding visitors round the city. "Beijing, you are a host to the present and a gateway to the future. Thank you!" he added.