The suspension of the director-general of the Department of Home Affairs Mkuseli Apleni has been overturned.
He was suspended in September.
Last week Tuesday, President Jacob Zuma reshuffled his Cabinet, which momentarily delayed and confused the court as Apleni now has a new boss.
Judge Hans Fabricius had learnt that Zuma had announced a Cabinet reshuffle which could have a direct impact on the urgent application he was dealing with.
Apleni was challenging his suspension, with the crux of his argument being that it is only the president who can either suspend or dismiss him; alternatively the president needs to confer those powers to the minister of home affairs.
He wanted his suspension declared invalid and for him to be reinstated.
The reshuffle threw a curveball at the court as the official responsible for suspending Apleni was former minister of home affairs Hlengiwe Mkhize, who has now been appointed as the minister of higher education and training in place of Blade Nzimande.
The new home affairs minister is Ayanda Dlodlo, who was previously the minister of communications.
During court proceedings, Fabricius asked the legal teams representing the Department of Home Affairs, the Presidency and Apleni, if the reshuffle wouldn't render many of their arguments moot.