In 1881, the Egyptian army officers demonstrated their strength and their ability to intimidate the Khedive. The army society included Colonel Ahmad Urabi, who would become the leader of the nationalist movement, and Colonels Ali Fahmi and Abd El-All Hilmi. In 1881, a link was formed between the Urabists and the National Society. This expanded group took the name 'El Hizb al Watani El Ahli' (the National Popular Party). A large military demonstration in September 1881 forced the Khedive Tawfik to dismiss his Prime Minister. By the beginning of the year 1882, Urabi joined the government as undersecretary for war.
In January 1882, Britain and France sent a joint note declaring their support for the Khedive. In April 1882, France and Britain sent warships to Alexandria to support the Khedive amidst a turbulent climate, spreading fear of invasion throughout the country. The nationalist movement grew stronger and several popular revolts broke out. However, the Urabi Revolution, in 1882, ended up with Egypt being occupied by Britain. In July 1882, the British fleet began bombarding Alexandria. The British installed the khedive in the Ras al Tin Palace. In August, they invaded the Suez Canal Zone. The decisive battle was fought at Tall El Kabir on September 13, 1882. Urabi was caught and banished to Ceylon Island.
The purpose of the invasion had been to restore political stability to Egypt under a government of the Khedive and international controls which were in place to streamline Egyptian financing since 1876. In fact, Sultan Abd El-Hamid had refused Britain's request to intervene in Egypt against Urabi and to preserve the khedival government. Also, Britain's influence in Istanbul was declining while that of Germany was rising. Moreover, Britain's invasion of Egypt gave it the opportunity to supplant French influence in the country. Finally, Britain was determined to preserve its control over the Suez Canal and to safeguard the vital route to India.
Between 1883 and the outbreak of World War I in 1914, there were three British consuls in Egypt: Lord Cromer (1883-1907), Sir John Eldon Gorst (1907-11), and Lord Herbert Kitchener (1911-14). In 1883, being the British administrator, Lord Cromer became the effective ruler of the country. In 1906, the Denshawai Incident provoked a questioning of British rule in Egypt.
In 1906, in a village called Denshawai, near the Egyptian Delta, British officers were shooting pigeons for sport but they accidentally wounded an Egyptian woman. Feeling outrage, the villagers surrounded the British officers and, in the confusion, wounded two of them. The officers in response opened fire and fled. Eventually, one of them died of his wounds while returning to camp. The ensuring response from the British was explosive. An Egyptian peasant was beaten to death by British soldiers after the dead officer was found. Fifty-two Egyptians involved in the incident were charged, and four sentenced to death with others sentenced heavily with hard labor or public flogging. National sentiments were increased after the incident and political parties started to form in protest to British rule with the ultimate aim of independence.
In 1907, Gorst had to face a growing Egyptian nationalism that demanded British evacuation from the country. His attempts to pacify the nationalists went in vain. In 1911, Kitchener arrived in Egypt. He was already famous for being the man who had avenged the death of General Charles Gordon in Khartoum in 1885 during the Mahdist uprising. Kitchener introduced a new constitution in 1913 which gave the country some representative institutions both locally and nationally. The Organic Law of 1913 provided for a legislative assembly with an increased number of elected members and expanded powers. The Egyptians' desire to attain self-determination was reinforced when the allies used the country as a barracks during the First World War.
When the Ottoman Empire entered World War I in 1914 on the side of the Central Powers, Martial law was declared in Egypt. The British Government declared Egypt a protectorate, severing the country from the Ottoman Empire. Britain deposed Khedive Abbas II, who had succeeded Khedive Tawfik upon the latter's death in 1892, because Abbas II, who was in Istanbul when the war broke out, was suspected of pro-German sympathies. Khedive Tawfik was quite obedient to the British colony. Then, Kitchener was recalled to London to serve as minister of war.