structural:reformatting, quality:corruption, structural:summarization, quality:correction
History

The history of Bangkok dates at least back to the early 15th century, to when it was a village on the west bank of the Chao Phraya River, under the rule of Ayutthaya. Because of its strategic location near the mouth of the river, the town gradually increased in importance. Bangkok initially served as a customs outpost with forts on both sides of the river, and was the site of a siege in 1688 in which the French were expelled from Siam. After the fall of Ayutthaya to the Burmese in 1767, the newly crowned King Taksin established his capital at the town, which became the base of the Thonburi Kingdom. In 1782, King Phutthayotfa Chulalok (Rama I) succeeded Taksin, moved the capital to the eastern bank's Rattanakosin Island, thus founding the Rattanakosin Kingdom. The City Pillar was erected on 21 April 1782, which is regarded as the date of foundation of Bangkok as the capital.

Bangkok's economy gradually expanded through international trade, first with China, then with Western merchants returning in the early-to-mid 19th century. As the capital, Bangkok was the centre of Siam's modernization as it faced pressure from Western powers in the late-19th century. The reigns of Kings Mongkut (Rama IV, r. 1851–68) and Chulalongkorn (Rama V, r. 1868–1910) saw the introduction of the steam engine, printing press, rail transport and utilities infrastructure in the city, as well as formal education and healthcare. Bangkok became the centre stage for power struggles between the military and political elite as the country abolished absolute monarchy in 1932.

As Thailand allied with Japan in World War II, Bangkok was subjected to Allied bombing, but rapidly grew in the post-war period as a result of US aid and government-sponsored investment. Bangkok's role as a US military R&R destination boosted its tourism industry as well as firmly establishing it as a sex tourism destination. Disproportionate urban development led to increasing income inequalities and migration from rural areas into Bangkok; its population surged from 1.8 million to 3 million in the 1960s.

Following the US withdrawal from Vietnam in 1973, Japanese businesses took over as leaders in investment, and the expansion of export-oriented manufacturing led to growth of the financial market in Bangkok. Rapid growth of the city continued through the 1980s and early 1990s, until it was stalled by the 1997 Asian financial crisis. By then, many public and social issues had emerged, among them the strain on infrastructure reflected in the city's notorious traffic jams. Bangkok's role as the nation's political stage continues to be seen in strings of popular protests, from the student uprisings in 1973 and 1976, anti-military demonstrations in 1992, and frequent street protests since 2006, including those by groups opposing and supporting former prime minister Thaksin Shinawatra from 2006 to 2013, and a renewed student-led movement in 2020.

Administration of the city was first formalized by King Chulalongkorn in 1906, with the establishment of Monthon Krung Thep Phra Maha Nakhon (มณฑลกรุงเทพพระมหานคร) as a national subdivision. In 1915, the monthon was split into several provinces, the administrative boundaries of which have since further changed. The city in its current form was created in 1972 with the formation of the Bangkok Metropolitan Administration (BMA), following the merger of Phra Nakhon province on the eastern bank of the Chao Phraya and Thonburi province on the west during the previous year.