The continued British occupation of Sudan fueled an increasingly strident nationalist backlash in Egypt, with Egyptian nationalist leaders determined to force Britain to recognise a single independent union of Egypt and Sudan. With the formal end of Ottoman rule in 1914, Hussein Kamel was declared Sultan of Egypt and Sudan, as was his brother and successor Fuad I. They continued their insistence of a single Egyptian-Sudanese state even when the Sultanate was retitled as the Kingdom of Egypt and Sudan, but the British continued to frustrate such reaches for independence.
The Egyptian Revolution of 1952 finally heralded the beginning of the march towards Sudanese independence. Having abolished the monarchy in 1953, Egypt’s new leaders, Muhammad Naguib, whose mother was Sudanese, and later Gamal Abdel-Nasser, believed the only way to end British domination in Sudan was for Egypt to officially abandon its claims of sovereignty over Sudan.
The British on the other hand continued their political and financial support for the Mahdi successor Sayyid Abdel Rahman who, they believed, could resist the Egyptian pressures for Sudanese independence. Rahman was able to resist the pressures, but his regime was plagued with political ineptitude, which garnered him a loss of support in northern and central Sudan. Egypt and Britain both sensed a great political instability forming, and opted to allow the Sudanese in the north and south to have a free vote on independence to see whether they wished for a British withdrawal.
A polling process was carried out resulting in composition of a democratic parliament and Ismail al-Azhari was elected first Prime Minister and led the first modern Sudanese government.[28] On 1 January 1956, in a special ceremony held at the People’s Palace, the Egyptian and British flags were lowered and the new Sudanese flag, composed of green, blue and white stripes, was raised in their place by the prime minister Ismail al-Azhari.
Info from https://en.wikipedia.org/wiki/Sudan