SHANGHAI — China wrapped up its record-breaking World Expo on Sunday with a lavish display of national pride, as organizers of the mammoth event pledged to continue pursuing more sustainable, balanced growth.

More than 72 million visitors have been treated to a smorgasbord of cultures and technologies focused on the theme "Better City, Better Life" in the biggest, most expensive expo since such events began with the Great Exhibition of 1851 in London, which marked the coming of the Industrial Revolution.

The event showcased China's rise as a modern industrial power, and drew accolades from U.N. Secretary-General Ban Ki-moon, who said it "offers hope for tackling global challenges."

"The Shanghai Expo will close soon but it will not be forgotten," Ban told dignitaries gathered Sunday for closing festivities. "Let us keep the Shanghai vision alive in our discussions and our lifestyles."

The expo's theme of urban sustainability dovetails with Beijing's own agenda of shifting to a more sustainable pace of growth after decades of untrammeled industrialization that have brought unprecedented affluence, but also huge gaps between wealthy and poor and massive environmental degradation.

Building better cities is an urgent priority, not "just something that would be nice to have," said Sha Zukang, U.N. under secretary-general.

"We must make it possible and make it happen," he said.

China spent 28.6 billion yuan ($4.3 billion) on the event and many billions more on improving subways, airports and other public facilities in Shanghai, a metropolis of more than 20 million people. The entire city got fresh paint, new landscaping and flowers and a kaleidoscope of decorative lighting.

In an effort to make the event "green," Shanghai deployed electric buses and carts and installed energy-saving air conditioning and water filters meant to reduce use of bottled water. It also recycled rain water and made use of solar power.

But lavish opening and closing ceremonies — Sunday's extravaganza included ladies in pink gowns wearing headpieces shaped to represent the myriad national pavilions — showed the country's obsession with exhibiting its newfound wealth and power.

The majority of visitors were from the Shanghai region and elsewhere in China — ordinary folk who flooded into the city, enduring waits of up to 10 hours, sweltering summer temperatures and other inconveniences for what might be a once-in-a-lifetime experience of foreign places and people.

The 72 million who managed to get to the event surpassed the previous record of 64.21 million visitors who attended the 1970 fair in Osaka, Japan. The two square mile (5.2 square kilometer) expo zone handled an average of 370,000 visitors each day, and a record 1.03 million on Oct. 16.

"The pavilions look great from the outside, better than I expected, but I'm not convinced it's worth waiting for hours in lines to get in," said Liu Xiaoyin, who drove her 13-year-old daughter to Shanghai from a nearby city.

For those patient enough to wait, highlights included Denmark's famed "Little Mermaid" sculpture, a rooftop cable car ride above a replica alpine meadow at the Swiss pavilion, famous impressionist paintings from the Louvre at the French pavilion, and entertainment by Cirque du Soleil courtesy of Canada.

"Thanks to the expo, people like me who never would have a chance to go abroad can experience the whole world," said Zou Aiguo, a retiree from central China's Jiangxi province whose son gave him an expo tour as a present.

Though the event did provoke some complaints, especially from those unhappy to be forced out of old housing to make way for the expo zone, the authorities stifled any public protests or dissent.

All but a handful of the more than 200 structures built for the expo along the banks of the Huangpu river — former shipyards and steel works likely destined to become prime real estate — are to dismantled and recycled or otherwise disposed of.

The next expo, in 2012, will be in the South Korean port city of Yeosu, with a similar theme of "Green Growth, Blue Economy," or marine-based sustainability. After that the expo will move to the Italian city of Milan in 2015, with a focus on food safety and security. (AP)