The first truly Thai kingdom was established in 1238 amidst waning Khmer dominance of the region. The Thais prospered, religion and culture flourished and King Ramkhamhaeng developed the first Thai script.
The kingdom of Ayutthaya absorbed Sukhothai in 1376, expanding and consolidating Thai sovereignty and nationhood. The Khmers were vanquished by 1431, leaving Ayutthaya to rule an area twice that of modern Thailand. Europeans were visiting the royal court by the early 16th century, and many called it Asia's most magnificent city.
The Burmese destroyed Ayutthaya in 1767, but were soon expelled by General Phaya Taksin. He crowned himself king in 1769 and established his capital, Thonburi, on the Chao Phraya river. Years later he was deposed and executed.
Chao Phaya Chakri, Rama I, succeeded Taksin and founded the Chakri dynasty in 1782. 'Rama' is the title of each Chakri king, and several are well known to westerners: Mongkut, Rama IV (r. 1851-68) reformed education and allowed limited western trade. Chulalongkorn, Rama V (r. 1868-1910) abolished slavery, promoted modernization and made large territorial sacrifices to prevent European colonization. A bloodless coup ended the absolute monarchy in 1932, under the reign of Prajadhipok, Rama VII (r. 1925-35). A constitutional monarchy similar to that of Britain was established soon afterwards. Thailand's present king, Bhumibol Adulyadej (Rama IX) is the world's longest reigning monarch, having occupied the throne since 1946, shortly after Japan's World War II presence in the country.
Until 1939, Thailand's official name was Siam. When Rama VII abdicated in 1935, his 10-year-old nephew, Ananda Mahidol, became Rama VIII. The young king was studying in Switzerland (not to return until 1945), and in his absence the government of Phibul Songkram changed the country's name to Thailand, rendered locally as Prathet Thai, meaning, so some say, Land of the Free.
Postwar military coups and suppression of democracy activists, notably in 1973, 1976 and 1991, gave way to democratic reform including a new constitution. Political and press freedoms are some of the strongest in Asia.