BANGKOK - Barriers protecting Bangkok from Thailand’s worst floods in half a century held firm yesterday as the government said some water drenching provinces just north of the capital has begun receding.

That restored hope that Bangkok, with 9 million people, could escape unharmed. But outside of the city, thousands of people remain displaced, and hungry residents are struggling to survive in half-submerged towns. The military yesterday rescued terrified civilians from the rooftops of flooded buildings in the city of Ayutthaya, one of the country’s hardest-hit.

Bangkok has averted calamity so far because of a complex system of flood walls, canals, dikes, and underground tunnels that helped divert vast pools of runoff south into the Gulf of Thailand. But if any of the defenses fail, floodwaters could sweep through the city.

Seasonal rains that drench Southeast Asia annually have been extraordinarily severe this year, killing hundreds of people across the region. Thailand has been particularly affected.

© Copyright 2011 Globe Newspaper Company.