The history of Myanmar (also known as Burma) covers the period from the time of first-known human settlements 13,000 years ago to the present day. The earliest inhabitants of recorded history were a Tibeto-Burman-speaking people who established the Pyu city-states ranged as far south as Pyay and adopted Theravada Buddhism.
Another group, the Bamar people, entered the upper Irrawaddy valley in the early 9th century. They went on to establish the Bagan Kingdom (1044–1287), the first-ever unification of the Irrawaddy valley and its periphery. The Burmese language and Bamar culture slowly came to replace Pyu norms during this period. After the First Mongol invasion of Burma in 1287, several small kingdoms, of which the Kingdom of Ava, the Hanthawaddy Kingdom, the Kingdom of Mrauk U and the Shan States were principal powers, came to dominate the landscape, replete with ever-shifting alliances and constant wars.
In the second half of the 16th century, the Taungoo Dynasty (1510–1752) reunified the country, and founded the largest empire in the history of Southeast Asia for a brief period. Later Taungoo kings instituted several key administrative and economic reforms that gave rise to a smaller, more peaceful and prosperous kingdom in the 17th and early 18th centuries. In the second half of the 18th century, the Konbaung Dynasty (1752–1885) restored the kingdom, and continued the Taungoo reforms that increased central rule in peripheral regions and produced one of the most literate states in Asia. The dynasty also went to war with all its neighbours. The Anglo-Burmese wars (1824–85) eventually led to British colonial rule.
British rule brought several enduring social, economic, cultural and administrative changes that completely transformed the once-agrarian society. Most importantly, the British rule highlighted out-group differences among the country's myriad ethnic groups. Since independence in 1948, the country has been in one of the longest running civil wars that remains unresolved. The country was under military rule under various guises from 1962 to 2010, and in the process has become one of the least developed nations in the world.