South Africa’s embattled Home Affairs Minister, Malusi Gigaba, has resigned two weeks after a video of him masturbating was widely circulated online.

A statement from the presidency said Mr 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”.

Mr Gigaba had accused South Africa’s security services of hacking his phone and releasing the 13-second video which, he says, was for his wife.

The 47-year-old has courted controversy in recent years over allegations that he used his powerful roles in various ministerial portfolios to assist the controversial Gupta business family.

All parties, including Mr Gigaba, deny any wrongdoing.

Many questioned Mr Gigaba’s fitness to hold office, saying his reputation had been tarnished.

In recent weeks, the questions grew louder, first over a Constitutional Court ruling which upheld an earlier finding that he lied under oath while giving evidence about a government contract.

Opposition parties had been pushing President Cyril Ramaphosa to sack him, and they have welcomed his resignation.