Updated

The Olympic flame approached the final destination of its long and sometimes contentious global tour Wednesday, greeted by rapturous crowds and tight security in the Chinese capital.

The colorful parade through Beijing marks one of the final steps in China's seven years of preparations for the games — a journey that has cost billions of dollars and one that the communist government hopes will end with the country's symbolic debut as a modern world power.

The torch will tour Beijing for three days before ending up at Friday's opening ceremony for the games and will be carried by a diverse crowd, including Chinese astronaut Yang Liwei, movie director Zhang Yimou and basketball superstar Yao Ming.

"I'm very happy to be here," said Yang, who was on China's first successful space mission, before the relay kicked off from the Forbidden City, home of China's previous emperors since the 15th century.

Photo Essay: Countdown to Opening Ceremony

Photo Essay: Beijing Prepares for Olympic Games

"That the torch is finally in Beijing is a realization of a dream we have had for a hundred years," Yang said, minutes before taking up the flame and beginning the Beijing leg.

Yao carried the torch out of China's historic Tiananmen Gate below a giant portrait of Communist Party stalwart Mao Zedong.

Overseas, the torch relay was disrupted by protests or conducted under extremely heavy security after it left Greece on March 24, turning an event that should have built up excitement for the games into a public relations disaster for the hosts.

The protests were mostly against China's crackdown in March on anti-government riots in Tibet and more general concerns over human rights issues in China.

In Beijing, the route was tightly guarded by police and military, and at least one Chinese-language newspaper carried a police announcement on its front page reminding relay spectators to cooperate with mandatory security checks and not to bring dangerous goods. Police said ceremonies marking the start and finish of the relay each day are closed to the public, according to the Beijing Youth Daily.

In Tiananmen Square crowds were small and strictly controlled in ordered lines, as the torch wound its way around the mausoleum of Chairman Mao. The only people allowed in were media and organized groups of supporters, mostly from major Olympic sponsors Lenovo and Coca-Cola, who shouted "Go China! Go Olympics!" and waved corporate flags.

"I feel the Olympics will help China develop, because China used to be so closed, and it gives an opportunity for the whole world to see China," said Weng Jianming, a 21-year-old Beijing University of Forestry student who rose at 3 a.m. to be bused to the square for the torch's passing about 9 a.m.

Nearby at the Forbidden City's Meridian Gate, lion dancers pranced on a huge stage, and thousands of people lined a wide avenue through the heart of Beijing in muggy heat to cheer on the torchbearers.

"I'm just so happy. I couldn't sleep last night," said Liu Yuzhen, a 54-year-old retiree who was one of the dancers. "It's our torch and it's in Beijing. It's a chance of a hundred years and it's finally here."

"China is strong now. I came here because I think the Olympics is everyone's responsibility," said Zhao Nuchi, from an organized group of Beijing teachers.

Wednesday's relay leg will end at the Temple of Heaven in south Beijing, where the emperor went to perform sacrifices for a good harvest. The Beijing leg will involve 841 torchbearers over three days and will also visit the Great Wall at Badaling, a site where prehistoric fossils of Peking Man were discovered.

The torch arrived back in the capital late Tuesday after an emotional run in Sichuan province, the site of a May 12 earthquake that killed almost 70,000 people and left 5 million homeless.

Organizers have been on heightened alert since an attack in China's restive Muslim region in the west killed 16 policemen on Monday.

Authorities also are keen to prevent similar attacks on the torch by protesters who earlier this year disrupted the relay in London, Paris and San Francisco.