After the Nubian kingdoms' fall in 1504, the Ottomans conquered most of Nubia, while the Funj conquered much of modern-day Sudan from Darfur to Khartoum ; the Funj began to use slaves in the army in the reign of Badi III (r. 1692-1711). Later, Egyptian slavers began raiding modern South Sudan. In particular, the ruler Muhammad Ali of Egypt attempted to build up an army of Southern Sudanese slaves with the aid of the Nubian slavers. Attempts to ban slavery were later attempted by British colonial authorities in 1899, after their victory in the Mahdi War.