Human occupation of Rwanda is thought to have begun shortly after the last ice age. By the 11th century, the inhabitants had organized into a number of kingdoms. In the 19th century, Mwami (king) Rwabugiri of the Kingdom of Rwanda conducted a decades-long process of military conquest and administrative consolidation that resulted in the kingdom coming to control most of what is now Rwanda. The colonial powers, Germany and Belgium, allied with the Rwandan court.
A convergence of anti-colonial, and anti-Tutsi sentiment resulted in Belgium granting national independence in 1962. Direct elections resulted in a representative government dominated by the majority Hutu under President Grégoire Kayibanda. Unsettled ethnic and political tensions were worsened when Juvénal Habyarimana, who was also Hutu, seized power in 1973. In 1990, the Rwandan Patriotic Front (RPF), a rebel group composed of 10,000 Tutsi refugees from previous decades of unrest, invaded the country, starting the Rwandan Civil War. The war ground on, worsening ethnic tensions, as the Hutu feared losing their gains.
The assassination of Habyarimana was the catalyst for the eruption of the 1994 genocide, in which hundreds of thousands of Tutsis and some moderate Hutus were killed, including the prime minister Agathe Uwilingiyimana. The Tutsi RPF conquered Rwanda, and thousands of Hutu were imprisoned pending the establishment of the Gacaca courts. Millions of Hutu fled as refugees, contributing to large refugee camps of Hutu in the neighboring Democratic Republic of the Congo, where there were already refugees from other countries. These were disbanded by an RPF-sponsored invasion in 1996 that replaced the new Congolese president as the result of the First Congo War. A second invasion to replace the new Congolese president initiated the Second Congo War, the deadliest war since World War II and one involving many African nations including Rwanda for many years to come.