During the period 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 potenial 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. in 1900 an agreement was signed with Buganda that gave the kingdomconsiderable autonomy. in 1904 the commercial cultivaion of cottonwas begun, and cotton soon became the major export crop; coffee and sugar productionaccelerated in 1920s. few permanent European settlers arrived in Uganda, many Asians (Indians, Pakistanis and Goans) settled in Uganda.
In 1901 a railroad from mombasa on the Indian ocean reached Kisumu, on lake Victoria, was connected by boat with uganda; the railroad was later extended to jinja and Kampala. in 1902 the eastern Province of Uganda was transferred to the British East Africa protectorate (kenya) for administrative reasons.
In 1921 a legislative counil for the protectorate was established and first african member was admitted in 1945.In 1961 there were three political parties in uganda. and on oct., 1962 uganda became Independent with A. Milton Obote, a Lango leader of the Uganda People's Congress (UPC), as Prime Minister.