The ceremony, carried live on national television, was held under tight security with hundreds of police and uniformed Olympic security volunteers deployed across the vast square and surrounding streets.
With a thick haze once again settling over the city, only specially-invited spectators and security-screened members of the media - marshalled by stern-faced but unfailingly polite volunteers - were allowed into the area.
The authorities had promised "detailed precautions" after the global leg of the torch relay was dogged by protests from pro-Tibet groups and human rights activists.
Adding to security concerns was Monday's grenade attack in the China's far western Xinjiang region, which left 16 police dead.
The Olympics, which open in just two days, are a showcase event for China's leaders and the government has poured billions of dollars into ensuring the games pass off without a hitch.
But shortly before the relay began on Wednesday morning, four foreign activists were taken away by police near the National Stadium in the north of the city, after they unfurled pro-Tibet banners on the street.
The protesters managed to climb to the top of lampposts near the stadium and tie banners banner reading "Tibet will be free" and another with the motto "One World, One Dream" - the slogan of the Beijing Olympics - along with "Free Tibet".
The National stadium, also known the Bird's Nest, will host the games opening ceremony on Friday and is ringed with metal fences and tight security, including China's latest anti-aircraft missiles. Countdown
|The torch is on the final leg of a controversial global relay
The torch's arrival in Beijing marks the final leg of the longest relay in Olympic history – lasting 130-days and covering 19 countries – and is one of the last elements in a seven-year-long countdown to the games.
One of the early torch carriers in Wednesday's ceremony was basketball star Yao Ming, China's most famous athlete, who carried the torch from the Forbidden City to sound of cheering and thundering drum beats into Tiananmen Square.
With China ramping up Olympic fever, thousands of cheerleading teams had been bussed into Tiananmen Square by their workplaces, many dressed in elaborate costumes.
"As a Beijing local, and a teacher, I feel really excited to watch the torch relay in our capital," said teacher, Li Lin, part of a team of dancers dressed in blue sequins and waving pink pompoms as the torch runners passed by.
"I feel honoured to represent people in Beijing to come and attend the torch relay."
Ma Shuyin, a social worker from Beijing's Xuanwu district, said that while she had heard of Monday's attack in Xinjiang, she had no concerns about security in Beijing.
"I'm not worried. There might be special situations in security but I'm sure they will be handled properly," she said. Protests
|Cheerleaders were bussed in from across Beijing for the ceremony
The torch will spend the remaining days before Friday night's opening ceremony touring a series of landmark sights in and around Beijing, including the Temple of Heaven and the Great Wall, as well as visiting the Beijing Economic and Technology Area – a business zone of the kind China's leaders hope symbolise China's future.
Some 841 relay runners are expected to take part in the final Beijing leg of the relay before the torch enters the National Stadium on Friday night for the lighting of the Olympic cauldron.
Wednesday's rapturous welcome given to the torch was in contrast to the dramatic scenes in the London, Paris and San Francisco legs of the relay where pro-Tibet protesters clashed with police, pro-China demonstrators and China's specially appointed "guardians of the flame".
The clashes were a severe embarrassment for the Chinese government and for Olympic officials which have touted the relay as a "journey of harmony".
On Tuesday Jacques Rogge, president of the International Olympic Committee (IOC), said the games governing body was debating whether to drop international relays for future Olympics, limiting the procession to within the host country after flame is lit in Greece's Ancient Olympia.
"We respect protests and freedom of expression, but violence is against the Olympic spirit," Rogge said.