The area surrounding Bangkok has always been a swamp and the Chao Praya River forms the biggest waterway here. In the 16th century there were already channels dug in the Chao Praya River to give shipping better access to and from the former capital Ayutthaya. The large meanders that the river course made on its way to the Gulf of Thailand were cut off by canals. The majority of waterways were created after Bangkok became the new capital. The most southern of the canals had to be filled in again because at high tide the city flooded with seawater.