uncil. The operation effectively placed Nairobi under military siege, and the occupants were screened and the Mau Mau supporters moved to detention camps. The Home Guard formed the core of the government's strategy as it was composed of loyalist Africans, not foreign forces like the British Army and King's African Rifles. By the end of the emergency, the Home Guard had killed 4,686 Mau Mau, amounting to 42% of the total insurgents. The capture of Dedan Kimathi on 21 October 1956 in Nyeri signified the ultimate defeat of the Mau Mau and essentially ended the military offensive. During this period, substantial governmental changes to land tenure occurred. The most important of these was the Swynnerton Plan, which was used to both reward loyalists and punish Mau Mau.
The first direct elections for Africans to the Legislative Council took place in 1957. Despite British hopes of handing power to "moderate" African rivals, it was the Kenya African National Union (KANU) of Jomo Kenyatta that formed a government shortly before Kenya became independent on 12 December 1963, on the same day forming the first Constitution of Kenya. During the same year, the Kenyan army fought the Shifta War against ethnic Somalis who wanted Kenya's Northern Frontier District joined with the Republic of Somalia. The Shifta War officially ended with the signature of the Arusha Memorandum in October, 1967, but relative insecurity prevailed through 1969. To discourage further invasions, Kenya signed a defence pact with Ethiopia in 1969, which is still in effect.
On 12 December 1964 the Republic of Kenya was proclaimed, and Jomo Kenyatta became Kenya's first president. At Kenyatta's death in 1978, Daniel arap Moi became President. Daniel arap Moi retained the Presidency, being unopposed in elections held in 1979, 1983 (snap elections) and 1988, all of which were held under the single party constitution. The 1983 elections were held a year