Nationalism is the desire of the African people to rule themselves and the desire to terminate all foreign rule. In Africa Nationalism is the political will of the African people to oppose foreign domination in favor of African rule. It represented the African struggle against western colonialism and imperialism
The development of African nationalism passed through two phases and each of them had different aims in the struggle against colonial rule.
These two phases include;
Nationalism Before the End of Second World War
This type of nationalism was also known as early African resistances. Most of the African societies took up arms to fight and gain their freedom which was lost during the British and German occupation. Examples of these resistances are Abushiri resistances, Mkwawa resistance and Majimaji resistances. These types of resistances fought to eliminate German rule in Tanganyika but unfortunately all the resistances in East Africa were defeated so people were colonized reluctantly.
After the First and Second World War nationalism changed from the rise of African resistances to the formation of Social and welfare Associations. These were the groups of Africans who worked in various sectors of the colonial system. The major aim of the social and welfare associations was to create colonial government which respected the rights of the Africans rather than demanding the independence.

There were different forms of social and welfare associations such as;
[*]Independent Church Movements

These were the churches made by the Africans out of the churches formed by the missionaries. These independent churches were concerned with the opposition of the European church leaders who discriminated the Africans in the appointment for the positions of leadership in the churches, they also opposed land alienation, forced labor and involvement of African in the European wars. Examples of independent churches in East Africa are Gikuyu Independent church and Religion of spirit in Kenya, In Tanganyika there were African National church and Church of God.

[*]Peasant cooperatives

These associations were formed by the ethnic peasants in areas where there was the domination of the peasant economy. They normally opposed lower prices for their products, land alienation and privileges which were given to their chiefs. Examples of Peasant cooperatives in East Africa were Bataka Associations of 1921 in Uganda, Bukoba cooperative union of 1924 and Kilimanjaro Native cooperative union.

[*]Workers Associations/ Trade Unions

These were the groups made of different servants from different field such as teachers, clerks, drivers and the educated elites in the urban areas. Their demands were to improve African education, to secure better salaries and opposing colonial discrimination at the working areas. Examples of Workers Associations were Tanganyika African Association (TAA), Teachers Association, in Tanganyika and Kikuyu Central Association in Kenya.

African Nationalism after Second World War
This type of nationalism focused on achieving independence for their nations rather than changes or reformations which were needed in the early nationalism. Under this period many people united together under the formation of political parties to fight for the destruction of foreign rule in favor of the African self-rule.
Factors for the rise of the Nationalism in East Africa
Internal factors
Colonial exploitation in the colonies, Colonialism exploited all people of East Africa, African peasants sold their crops to the colonialist at a low prices, many people lost their land to settlers and also colonialists imposed high taxes to be paid by the peasants and workers under colonialism were paid low wages and they worked in poor working conditions so all those led to the rise of the movement against the colonialism.
Role of formal Education in the colonies, Education which was given to some Africans in the missionary schools and government schools shaped the thoughts of African and made them familiar with their rights so this was also crucial to the rise of nationalism.
The role of returned soldiers, these were the soldiers who fought in different wars, they participated in the Second World War so after the war they returned with a new outlook about the political independence. They fought against oppression, exploitation and fought for freedom and democracy so they became the active participants in the nationalist movements.
Italo- Ethiopia war, In 1935 Italians under the fascist leadership of Benito Mussolini attacked Ethiopia and defeated it so this event of Italy to attack Ethiopia united the Black people in all parts of the world to fight for their independence.
The role of Welfare and Social movements, these also played a significant role in the struggle for nationalist movements. They laid a foundation towards unity and solidarity among the African. They all faced one common enemy that is colonialism so they demanded their rights as a group and not as individuals.
External factors
The Impact of Second World War, This war weakened the economies of Britain, France and other Western European powers so the colonial empires were becoming the heavy burden to European countries and the Africans took the advantage of economic weakness to struggle for independence.
The role of UNO from 1945, UNO replaced the League of Nations and formed the trusteeship council which took the responsibility of preparing the mandate territories for their own independence. So United Nations started to put much pressure on the colonial governments to permit people to rule themselves so this also influenced the rise of Nationalism in Africa.
The role of Pan Africanism since 1900, this was a movement which opposed the oppression over all the black people in the world. This movement was founded in America by the people of African origin so they argued that Africa was for Africans themselves and encouraged people to struggle for self-rule and later on to form the United States of Africa. Most Africans were inspired by the declaration and started struggle for independence.
The role of USA, After the Second World War USA was a leading capitalist power, USA became powerful and rich because the war did not fought on her soil. USA built her economy by supplying the war weapons to Europe and earned a lot of money. She began to support African nationalism and decolonization by providing moral and materials support to the nationalists hence influenced the rise of nationalism to Africa.
The role of USSR, The rise of USSR as a socialist leading country made the arrangement of the destruction of the colonialism because the socialist ideologies opposed the exploitation of man by man so they declared to support all the nationalist movement morally and materially.

Decolonization is the process of Africans’ struggles to uproot colonialism and end the foreign rule either through constitutional means, or armed struggle.
They were four types/methods that Africans applied in the decolonization process from the colonial domination,

a) Through constitution/  peacefully means
This involved intensive negotiation between the colonialists and African nationalists e.g. the political independence of Tanganyika, Ghana, Uganda, Zambia etc. all these countries applied negotiation or peaceful means to get their independence.

b) Through revolution
Revolution is a suddenly change of the existing political system and its replacement by another power. This existed in colonies where independence was given to the minority at the expenses of the majority, for example in Zanzibar where minority Arabs were granted independence by the British which prompted the majority blacks to make a revolution in 1964, and replaced with another new political system that is supported by the masses. It took place even Egypt and Libya.
c) Through Armed Struggle
this was conducted in the situation where peaceful means failed and the imperialist were reluctant to negotiate or to give independence to the Africans. In such situation the Africans picked up arms to fight the imperialists by force as a method to achieve their independence it involved bloodshed use of guerrilla warfare. For example in Zimbabwe, Kenya, Angola, South Africa, Namibia, Mozambique.

d) Combination of constitution and armed struggle
these liberations combined both methods. Firstly the Africans resorted to armed struggle as a way to achieve their independence and then applied dialogue/peaceful means to solve the problems of their independence, this happened in Kenya and Zimbabwe.

(i) Existence of settler in the colonies, Those that had a number of white settlers like Kenya and Zimbabwe whereby they made some developments in form of investment the colonialist were not willing to surrender their wealth to Africans and were not sure of their future incase Africans take over the government, thus giving independence was very difficult. This made the Africans to apply armed struggle as the means of getting their independence.

(ii) The nature of the colony. Colonies that were regarded as overseas provinces of the colonial nation and view them as their mandatory land this was mostly to colonial masters like Portugal and France in such cases the colonialist were not ready to grant independence until the African decide to use the barrel of the gun to give independence; therefore armed struggle was the only solution for example in Kenya, Angola, Mozambique and South Africa.

(iv) the economic strength of the colony. In those colonies were development was very high and colonial investment was huge like South Africa and Zimbabwe the colonialists were not able to grant independence to the Africans in a peaceful way, the only solution remained to apply forceful means.

(v) The financial economic position of the colonial power. Many colonies that belonged to Portugal applied armed struggle because Portugal economic position was not good highly depended ion Africa colonies for domestic development so she was unwilling to give independence.

(vi) The status of the colony those colonies that were under the trust ship of UN managed to achieve their Independence easily through peaceful means because of the pressure from UN and USA, like Tanganyika got her independence early enough than other east African sister nations of Kenya and Uganda, but those who were mandatory colonies could not get their independence so easily thus armed struggle

Existence of peasant cash crops; colonies that had developed peasant cash crops like, Uganda, Nigeria, Ghana, and Tanganyika, achieved their independence through peaceful means, the colonialist could not delay this independence after realizing that they can continue exploiting their resources through neo colonialism and they had nothing to lose in granting independence

Existence Of wealthy in the colony especially minerals like gold diamond sliver, industries, well developed social over heads like in south Africa, Kenya, independence could not be given easily why because the colonialist were not ready to leave such wealthy un exploited armed struggle became the only solution’ in case of such situations and on the other side in colonies where development was minimal no infrastructure independence was easily given through peaceful means e.g. in Tanganyika.