South Africa’s minister for Home Affairs has resigned from his post two weeks after he was seen in a viral video seriously masturbating, which he claimed was meant for his wife.

Malusi Gigaba, according to the BBC, has accused the South Africa's security services of hacking his phone and releasing the 13-second video.

The news website reported that a statement from the presidency said Gigaba, a senior member of the governing African National Congress (ANC) - was "stepping aside for the sake of our country and the movement to which he belongs".

Prior to the resignation, the embattled 47-year-old minister had been hit with other controversies following which many anticorruption activists and opposition parties called on Cyril Ramaphosa to sack him.

Earlier, reports say he was accused of using his roles in various ministerial portfolios to assist the controversial Gupta business family form India which was widely linked to several corruption scandals under ex-President Jacob Zuma's administration.

READ ALSO: Nigerian police reveal why they will not stop taking bribes (Video)

Although Gigaba and other parties denied the allegations, some individuals and civil society groups as well as opposition parties thought he was not fit to hold a ministerial position.

The BBC again reported that in recent weeks, calls for the minister’s removal heightened following a Constitutional Court ruling which upheld an earlier finding that he lied under oath while giving evidence about a government contract.