The long struggle for South Africa's leader to remain in power amid corruption allegations appears to have ended.