Early civilisations in Myanmar included the Tibeto-Burman-speaking Pyu city-states in Upper Burma and the Mon kingdoms in Lower Burma. In the 9th century, the Bamar people entered the upper Irrawaddy valley and, following the establishment of the Pagan Kingdom in the 1050s, the Burmese language, culture and Theravada Buddhism slowly became dominant in the country. The Pagan Kingdom fell due to the Mongol invasions and several warring states emerged. In the 16th century, reunified by the Taungoo Dynasty, the country was for a brief period the largest empire in the history of Mainland Southeast Asia. The early 19th century Konbaung Dynasty ruled over an area that included modern Myanmar and briefly controlled Manipur and Assam as well. The British took over the administration of Myanmar after three Anglo-Burmese Wars in the 19th century and the country became a British colony. Myanmar was granted independence in 1948, as a democratic nation. Following a coup d'état in 1962, it became a military dictatorship.