The Sudanese Mahdiyyaq is a religious and political movement by Muhammad Ahmed bin Abdullah (later Muhammad al-Mahdi) against the Khediavate of Egypt, which had ruled the Sudan since 1821.