Lt Gen Shadrack Sibiya has denied all the charges against him

South Africa's deputy police chief has resigned three weeks after he was charged with sexual offences.

A lawyer representing Lt Gen Shadrack Sibiya submitted his resignation letter at his disciplinary hearing on Monday, a police spokesperson said.

Sibiya, 59, is also accused of having links to organised crime bosses - allegations which led to him being suspended last year.

He denies those allegations, as well as charges that he sexually groomed a 16-year-old girl and raped an 18-year-old woman. He also faces a charge of human trafficking.

Sibiya says he did have sex with the 18-year-old but that it was consensual.

He has been in custody since he was arrested three weeks ago.

Police spokesperson Athlenda Mathe said in a post on X that his departure from the police force was regarded as a dishonourable discharge, external because he was still facing a disciplinary case when he resigned.

The accusations that Sibiya was linked to crime bosses emerged at a major public inquiry over allegations of police corruption and collusion with criminals, known as the Madlanga Commission.

Sibiya was accused of interfering with investigations into political killings in KwaZulu-Natal province.

He was also accused of receiving a gift of cash, as well as 20 impalas, from an alleged criminal kingpin in exchange for a police contract.

The Madlanga Commission has transfixed South Africa over the past year and unearthed widespread allegations of links between police officers and crime bosses.

It was set up by President Cyril Ramaphosa after the KwaZulu-Natal police chief held a press briefing where he accused the then Police Minister Senzo Mchunu of working with criminal gangs.

Mchunu denies the allegations against him but has been suspended.

Former 'street kid' key to South Africa's police corruption inquiry

'Gifts' from a lover and 'botched' cocaine raids: Police inquiry grips South Africa

Grim discoveries of murdered women spark fear in South Africa

Go to BBCAfrica.com, external for more news from the African continent.

Follow us on Twitter @BBCAfrica, external, on Facebook at BBC Africa, external or on Instagram at bbcafrica, external