Prince Charles of Britain declared the games open Sunday in the presence of Indian President Pratibha Patil at a packed main stadium, where the vivid, colorful celebration contrasted months of criticism over mismanagement that had delayed completion of venues and the athletes’ village and tarnished the country’s reputation.

“India is ready. India’s big moment is finally here,” chief organizer Suresh Kalmadi said. “There have been delays and many challenges but we were able to ride over them all.” But in a sign of public anger at the problems, many among the 60,000 spectators at the Jawaharlal Nehru Stadium loudly booed Kalmadi when he rose to speak.

India spent billions of dollars to showcase its capital, building a new airport, subways, highways and stadiums in the run up to what is seen as a coming out party to celebrate the country’s new economic clout. The games bring together more than 6,000 athletes and officials from 71 countries and territories of the commonwealth every four years, but are being staged in Asia for only the second time.

Corruption scandals, health and security concerns, missed construction deadlines and filthy conditions at the athletes’ village became an embarrassment for India in recent months. A dengue fever diagnosis for an Indian team official who was admitted to hospital after moving into the village dominating headlines in the hours leading up to the ceremony.

The nighttime extravaganza began with the throbbing of gigantic drums — or nagada — pounded by turbaned men.

Before the drum beats were silenced, a massive white helium balloon, almost the size of the stadium’s infield, rose above the stands. The sides of the oblong balloon functioned as a 360-degree screen for the crowd to watch the show.

“The spectacular opening ceremony this evening is the reality that makes India incredible,” said G. Raghavan, an executive with a top Indian company and a proud spectator in the crowd. “The games are set for great success, making the months of negative publicity irrelevant.” As the teams marched in, the loudest cheers for a guest nation were received by Pakistan, India’s arch rival.

The next two hours were a medley of rhythm, melody, color, light and choreography as artists from various parts of India, ranging from jungle tribespeople to graceful classical dancers, performed on the stage.

Bollywood superstar and Oscar winning composer A.R.

Rahman, who provided the score for Slumdog Millionaire,” wrote the theme song of the games, “Jiyo, Utho, Bado, Jeeto” or “Live, Rise, March, Win.” The show ended with a 10-minute “Great Indian Journey,” in which hundreds of artists appeared on the ground holding props representing a train moving to the rhythm of a Bollywood song, another Rahman composition.

As the train stopped, the props dissolved into an elaborate bazaar scene in riotous color.

The spectacle evoked Indian traditional life — women pounding rice by hand, weavers at looms, launderers washing clothes, a wedding procession — as well as the country’s cultural and religious diversity, its myriad languages and its newfound economic strength.

Officials hope the spectacular beginning to the games will help erase the ignominy the country has experienced over the past few weeks because of the last minute preparations.

At one point, the specter of teams withdrawing from the games was very real and critics wondered loudly if the games could proceed at all.

But Indian officials insisted that just like an Indian wedding — when preparations are often still frantic on until the last day — the games will take place without a hitch.

“The games will be an excellent one. Whatever has dogged the games will be wiped away. We can also show to the world that India can conduct an event of international standards,” said C.K. Valson, the competition manager at the Jawaharlal Nehru stadium.

Mindful of the security threat, the government deployed tens of thousands of armed policemen and troops in the city, creating a virtual lockdown. Unmanned aerial aircraft and helicopters kept a vigil from the air.

Shops were ordered shut Sunday, and roadside vendors told to stay away for the duration of the 12-day games. Schools and colleges are closed for holidays until Oct. 14.

India is sending a 619-strong contingent, including 409 competitors, the biggest of all delegations. The hosts are targeting 100 medals and want to finish as high as second in the medals standings. It won 98 medals for a fourth-place finish in Melbourne in 2006 behind Australia, England and Canada.