The Mahdi died less than six months later, but not before establishing his Islamic state in Sudan and relocating its capital to Omdurman. A subordinate known as the Khalifa succeeded him after a violent power struggle, and prevented the collapse of the state following the Mahdi's death through ruthless and effective administration.[8]