The history of people living in the area now known as Lesotho goes back as many as 40,000 years. The present Lesotho (then called Basutoland) emerged as a single polity under paramount chief Moshoeshoe I in 1822. Under Moshoeshoe I, Basutoland joined other tribes in their struggle against the Lifaqane associated with the reign of Shaka Zulu from 1818 to 1828.
Subsequent evolution of the state was shaped by contact with the British and Dutch colonists from Cape Colony. Missionaries invited by Moshoeshoe I developed orthography and printed works in the Sotho language between 1837 and 1855. The country set up diplomatic channels and acquired guns for use against the encroaching Europeans and the Korana people. Territorial conflicts with both British and Boer settlers arose periodically, including Moshoeshoe's notable victory over the Boers in the Free State–Basotho War, but the final war in 1867 with an appeal to Queen Victoria, who agreed to make Basutoland a British suzerainty.[3] In 1869, the British signed a treaty at Aliwal with the Boers that defined the boundaries of Basutoland and later Lesotho, which by ceding the western territories effectively reduced Moshoeshoe's kingdom to half its previous size.
The extent to which the British exerted direct control over Basutoland waxed and waned until Basutoland's independence in 1966, when it became the Kingdom of Lesotho. However, when the ruling Basotho National Party (BNP) lost the first post-independence general elections to the Basotho Congress Party (BCP), Leabua Jonathan refused to cede and declared himself Tona Kholo (Sesotho translation of prime minister). The BCP began an insurrection that culminated in a January 1986 military coup forced the BNP out of office. Power was transferred to King Moshoeshoe II, until then a ceremonial monarch, but forced into exile when he lost favour with the military the following year. His son was installed as King Letsie III. Conditions remained tumultuous, including an August 1994 self-coup by Letsie III, until 1998 when the Lesotho Congress for Democracy (LCD) came to power in elections which were deemed fair by international observers. Despite protests from opposition parties, the country has remained relatively stable since.