In 1820 Muhammad Ali dispatched an army of 5,000 troops commanded by his third son, Ismail, south into Sudan with the intent of conquering the territory and subjugating it to his authority. Ali's troops made headway into Sudan in 1821, but met with fierce resistance. Ultimately, Egyptian troops and firearms ensured the conquest of Sudan. Ali now had an outpost from which he could expand to the source of the Nile in Ethiopia, and Uganda. His administration captured slaves from the Sudan, who were then made into a foot regiment of soldiers. Ali's harsh reign in Sudan, and that of his immediate successors, led eventually to the popular independence struggle of the self-proclaimed Mahdi, Muhammed Ahmed, in 1881.