Around 500 B.C., Bantu-speaking people migrated into SW Uganda from the west. By the 14th cent. they were organized in several kingdoms (known as the Cwezi states), which had been established by the Hima. Around 1500, Nilotic-speaking Luo people from present-day E South Sudan settled the Cwezi states and established the Bito dynasties of Buganda (in some Bantu languages, the prefix Bu means state; thus, Buganda means "state of the Baganda people"), Bunyoro, and Ankole. Later in the 16th cent., other Luo-speaking peoples conquered N Uganda, forming the Alur and Acholi ethnic groups. In the 17th cent. the Langi and Iteso migrated into Uganda.
During the 16th and 17th cent., Bunyoro was the leading state of S Uganda, controlling an area that stretched into present-day Rwanda and Tanzania. From about 1700, Buganda began to expand (largely at the expense of Bunyoro), and by 1800 it controlled a large territory bordering Lake Victoria from the Victoria Nile to the Kagera River. Buganda was centrally organized under the kabaka (king), who appointed regional administrators and maintained a large bureaucracy and a powerful army. The Baganda raided widely for cattle, ivory, and slaves. In the 1840s Muslim traders from the Indian Ocean coast reached Buganda, and they exchanged firearms, cloth, and beads for the ivory and slaves of Buganda. Beginning in 1869, Bunyoro, ruled by Kabarega and using guns obtained from traders from Khartoum, challenged Buganda's ascendancy. By the mid-1880s, however, Buganda again dominated S Uganda.
In 1862, John Hanning Speke, a British explorer interested in establishing the source of the Nile, became the first European to visit Buganda. He met with Mutesa I, as did Henry M. Stanley, who reached Buganda in 1875. Mutesa, fearful of attacks from Egypt, agreed to Stanley's proposal to allow Christian missionaries (who Mutesa mistakenly thought would provide military assistance) to enter his realm. Members of the British Protestant Church Missionary Society arrived in 1877, and they were followed in 1879 by representatives of the French Roman Catholic White Fathers; each of the missions gathered a group of converts, which in the 1880s became fiercely antagonistic toward one another. At the same time, the number of Baganda converts to Islam was growing.
In 1884, Mutesa died and was succeeded as kabaka by Mwanga, who soon began to persecute the Christians out of fear for his own position. In 1888, Mwanga was deposed by the Christians and Muslims and replaced by his brothers. He regained the throne in 1889, only to lose it to the Muslims again after a few weeks. In early 1890, Mwanga permanently regained his throne, but at the expense of losing much of his power to Christian chiefs.
During the period in 1889 when Mwanga was kabaka, he was visited by Carl Peters, the German colonialist, and signed a treaty of friendship with Germany. Great Britain grew alarmed at the growth of German influence and the potential threat to its own position on the Nile. In 1890, Great Britain and Germany signed a treaty that gave the British rights to what was to become Uganda. Later that year Frederick Lugard, acting as an agent of the Imperial British East Africa Company (IBEA), arrived in Buganda at the head of a detachment of troops, and by 1892 he had established the IBEA's authority in S Uganda and had also helped the Protestant faction defeat the Roman Catholic party in Buganda.
In 1894, Great Britain officially made Uganda a protectorate. The British at first ruled Uganda through Buganda, but when Mwanga opposed their growing power, they deposed him, replaced him with his infant son Daudi Chwa, and began to rule more directly. From the late 1890s to 1918, the British established their authority in the rest of Uganda by negotiating treaties and by using force where necessary. In 1900 an agreement was signed with Buganda that gave the kingdom considerable autonomy and also transformed it into a constitutional monarchy controlled largely by Protestant chiefs. In 1901 a railroad from Mombasa on the Indian Ocean reached Kisumu, on Lake Victoria, which in turn was connected by boat with Uganda; the railroad was later extended to Jinja and Kampala. In 1902 the Eastern prov. of Uganda was transferred to the British East Africa Protectorate (Kenya) for administrative reasons.
In 1904 the commercial cultivation of cotton was begun, and cotton soon became the major export crop; coffee and sugar production accelerated in the 1920s. The country attracted few permanent European settlers, and the cash crops were mostly produced by African smallholders and not on plantations as in other colonies. Many Asians (Indians, Pakistanis, and Goans) settled in Uganda, where they played a leading role in the country's commerce. During the 1920s and 30s the British considerably reduced Buganda's independence.
In 1921 a legislative council for the protectorate was established; its first African member was admitted only in 1945, and it was not until the mid-1950s that a substantial number of seats was allocated to Africans. In 1953, Mutesa II was deported for not cooperating with the British; he was allowed to return in 1955, but the rift between Buganda and the rest of Uganda remained. In 1961 there were three main political parties in Uganda—the Uganda People's Congress (UPC), whose members were mostly non-Baganda; the Democratic party, made up chiefly of Roman Catholic Baganda; and the Kabaka Yekka [Kabaka only] party, comprising only Baganda.
On Oct. 9, 1962, Uganda became independent, with A. Milton Obote, a Lango leader of the UPC, as prime minister. Buganda was given considerable autonomy. In 1963, Uganda became a republic, and Mutesa was elected president. The first years of independence were dominated by a struggle between the central government and Buganda. In 1966, Obote introduced a new constitution that ended Buganda's autonomy. The Baganda protested vigorously and seemed on the verge of taking up arms when Obote captured the kabaka 's palace at Mengo, forced the kabaka to flee the country, and ended effective Baganda resistance.
In 1967 a new constitution was introduced giving the central government—especially the president—much power and dividing Buganda into four districts; the traditional kingships were also abolished. In 1969, Obote decided to follow a leftist course in the hope of bridging the country's ethnic and regional differences through a common social policy.
In Jan., 1971, Obote, at the time outside the country, was deposed in a coup by Maj. Gen. Idi Amin. Amin was faced with opposition within the army by officers and troops loyal to Obote, but by the end of 1971 he was in firm control. Amin cultivated good relations with the Baganda. In 1972–73 he initiated severe diplomatic wrangles with the United States and Israel, both of which had provided Uganda with military and economic aid and were now accused of trying to undermine the government. Amin purged the Lango and Acholi tribes and moved against the army. In Aug., 1972, he ordered Asians who were not citizens of Uganda to leave the country, and within three months all 60,000 had left, most of them for Great Britain. Although a small minority, Asians had played a significant role in Ugandan business and finance, and their expulsion hurt the economy. From 1971 to 1973, there were border clashes with Tanzania, partly instigated by exiled Ugandans loyal to Obote, but, in early 1973, Amin and Julius Nyerere, president of Tanzania, reached an agreement that appeared to head off future incidents.
Amin's rule became increasingly autocratic and brutal; it is estimated that over 300,000 Ugandans were killed during the 1970s. His corrupt and arbitrary system of administration exacerbated rifts in the military, which led to a number of coup attempts. Israel conducted a successful raid on the Entebbe airport in 1976 to rescue passengers on a plane hijacked by Palestinian terrorists. Amin's expulsion of Israeli technicians won him the support of Arab nations such as Libya.
In 1976, Amin declared himself president for life and Uganda claimed portions of W Kenya; the move was diverted by the threat of a trade embargo. In 1978, Uganda invaded Tanzania in an attempt to annex the Kagera region. The next year Tanzania launched a successful counterinvasion and effectively unified disparate anti-Amin forces under the Uganda National Liberation Front (UNLF). Amin's forces were driven out and Amin himself fled the country.
Tanzania left an occupation force in Uganda that participated in the looting of Kampala. Yusufu Lule was installed as president but was quickly replaced by Godfrey Binaisa. The UNLF, suffering from internal strife, was swept out of power by Milton Obote and his party, the Uganda People's Congress. The National Resistance Army (NRA) conducted guerrilla campaigns throughout the country and, following the withdrawal of Tanzanian troops in 1981, attacked former Amin supporters. In the early 1980s, approximately 200,000 Ugandans sought refuge in neighboring Rwanda, Congo, and Sudan. In 1985, a military coup deposed Obote, and Lt. Gen. Tito Okello became head of state.
When it was not given a role in the new regime, the NRA continued its guerrilla campaign and took Kampala in 1986, and its leader, Yoweri Museveni, became the new president. He instituted a series of measures, including cutbacks in the civil service and army and privatization of state-owned companies, in a generally successful effort to rebuild the shattered economy. Many former government soldiers who had fled to the north when Museveni came to power formed a rebel force there, and in 1987 they mounted an unsuccessful attack on the new government. The rebels, however, were not crushed. AIDS became a serious health problem during the 1980s and has continued to claim many lives in Uganda; at the same time, however, the country has had greater success than many other African nations in slowing the spread of the disease.
In 1993, Museveni permitted the restoration of traditional kings, including King Ronald Muwenda Mutebi II, the kabaka of the Baganda people, but did not grant the kings political power. In 1994 a constituent assembly was elected; the resulting constitution, promulgated in 1995, legalized and extended a ban on political party activity, although allowing party members to run as independents. In May, 1996, Museveni was easily returned to office in the country's first direct presidential elections. A new parliament, chosen in nonpartisan elections in June of the same year, was dominated by Museveni supporters.
In the late 1980s and 90s rebel militias based in Sudan and Congo (Kinshasa) staged intermittent attacks on border areas of Uganda. Fighting with northern rebels, mainly the Lord's Resistance Army (LRA), continued into the next decade. In 2002, after Sudanese officials permitted Ugandan forces to attack rebels bases in Sudan, the conflict intensified, but the army failed to achieve any significant success.
Ugandan troops also became involved in ongoing civil unrest in the Congo (then called Zaïre), first (1997) helping rebel groups to oust Mobutu Sese Seko and install Laurent Kabila as president, and then (1998) backing groups who sought to overthrow Kabila. Conflicts also erupted with Rwandan troops in the Congo in 1999. Uganda claimed its only interest was in securing its own borders. In early 2000, Ugandan officials discovered the bodies of nearly 800 people who had died by mass murder and mass suicide; they had been members of the Ugandan millennialist Movement for the Restoration of the Ten Commandments of God. In May, 2000, new fighting between Rwandan and Ugandan forces in the Congo led to tense relations with Rwanda.
In June a referendum was held in which Ugandans could vote for Museveni's "no-party" system or a multiparty democracy. Museveni argued that Uganda was not ready for political parties, which he said had divided the nation by tribe and religion. Opposition leaders, calling Museveni's system a one-party state, called for a boycott of the referendum. Museveni secured the voters' approval, but by a narrower margin than in 1996; although 88% voted yes, the turnout was only 51%.
In the presidential election in Mar., 2001, Museveni was reelected, but his margin of victory was inflated by apparent vote fraud. His popularity was, in part, diminished by discontent with Uganda's intervention in Congo's civil war and signs of corruption in the government. Uganda's forces were largely withdrawn from Congo by the end of 2002, but there was fighting in 2003 between the remaining Ugandan forces and Congolese rebels allied with Rwanda shortly before the last Ugandan troops withdrew. In 2005 the International Court of Justice ruled that Uganda had engaged in human rights abuses while in Congo, and had to pay compensation to Congo for looting by its forces.
Early in 2004 LRA rebels massacred perhaps as many as 200 civilians in N Uganda. The attack prompted a renewed government offensive that achieved some successes against the LRA; late in 2004 there was a brief truce with the LRA. In Oct., 2005, the International Criminal Court issued an arrest warrant for LRA leader Joseph Kony in connection with atrocities committed by the LRA. Meanwhile, in July, 2005, voters approved a return to a multiparty system, This time Museveni supported the abandonment of Uganda's "no-party" politics, in part because of international and internal pressure for the change. He also subsequently signed into law a constitutional amendment that eliminated the presidential term limit.
In Oct., 2005, Kizza Besigye, a former colonel who had been Museveni's doctor and confidant and who had run against the president in the 2001 election and received almost 30% of the vote, returned to Uganda from self-imposed exile to challenge Museveni again for the presidency. In November Besigye was arrested on treason and rape charges that his supporters denounced as trumped up to keep him for running against Museveni, who subsequently announced he would seek a third term. The arrest sparked riots and was criticized internationally, including by the African Union's fledgling Pan-African parliament. (Besigye was acquitted of the rape charge in Mar., 2006, and the constitutional court ordered the treason charges dismissed in Oct., 2010.) The campaign was also marred by army attempts to influence the vote in favor of Museveni and other irregularities. Museveni was reelected in Feb., 2006, with 59% of the vote. The results, which were challenged by Besigye's party, were upheld (April) by Uganda's supreme court, which said that the irregularities were not significant enough to have affected the outcome.
Talks with the LRA that began in July, 2006, led to an August agreement that called for a cease-fire, for rebels to assemble at camps in S Sudan, and subsequent peace negotiations. Kony and other LRA leaders, fearing ICC warrants for their arrest, remained in Congo along the Sudan border, and in late September the LRA pulled out of the talks, accusing the Ugandan army of trying to surround the camps. Uganda, on its part, accused LRA forces of violating the agreement by leaving the camps. In late October, Museveni won Congo's agreement to oust the LRA from its camps there, and subsequently Uganda and the LRA signed a new cease-fire agreement that called for buffer zones around the assembly camps. The cease-fire was extended several times, but otherwise the negotiations progressed with difficulty, and the cease-fire was marred by occasional violence.
In Feb., 2008, a peace agreement, including a permanent cease-fire, was finally reached with the LRA. It was scheduled to be signed in early April, but a number of issues, including the nature of procedures for trying rebels accused of crimes and whether ICC warrants against LRA leaders would be dismissed, led Kony (who had moved from Congo to the Central African Republic in March) to fail to sign the accord as planned. Subsequently there were signs that the LRA was rearming and recruiting. In June Uganda, Sudan, and Congo (Kinshasa) agreed to mount a joint offensive against the LRA if the talks failed, while Kony said that he would engage in further negotiations. The ICC warrants remained a sticking point, however. In Sept.–Oct., 2008, there were LRA attacks against villages in NE Congo that led the ICC's prosecutor to once again demand Kony's arrest.
In Dec., 2008, after Ugandan rebels based in Congo failed in November to sign a peace agreement with Uganda, Ugandan, Congolese, and South Sudanese forces mounted a joint campaign against the rebels' Congolese bases that lasted until Mar., 2009. Subsequently, Ugandan forces fought LRA that had moved into the Central African Republic, and Ugandan forces continued small-scale anti-LRA operations in the three neighboring countries in subsequent years. In 2012 the African Union announced plans for a regional military force led by Uganda and including Central African, Congolese, and South Sudanese troops to capture Kony.
In Sept., 2009, some of the worst riots in more than two decades occurred in Kampala when the government refused to allow the Baganda king to visit Kayunga, a district that had declared its secession from Buganda, the traditional Baganda kingdom. In November, passage of a land law that strengthened tenants rights was denounced by Bagandan traditional chiefs, who control large tracts of land. Tensions between the government and the Baganda continued into 2010, and were aggravated in March when a fire destroyed the tombs of the Buganda kings.
In June, 2010, Kampala suffered two suicide-bomb attacks; mounted by hardline Somali Islamists, they were in retaliation for the presence of Ugandan peacekeeping troops in Somalia. In the Feb., 2011, presidential election Museveni's primary challenger was again Besigye. The president was reelected with 68% of the vote in an election marred by some irregularities; Besigye again accused the ruling party of fraud, and subsequently mounted recurring protests against Museveni's government. In 2013, the parliament enacted legislation that gave officials increased powers to limit and disperse public political gatherings.