The US has accused South Africa's defence ministry of refusing to obey orders from its own government to send home Iranian warships that have been conducting naval exercises in the African country's waters.

South Africa can't lecture the world on 'justice' while cozying up to Iran, it said in a statement.

In response, South Africa's defence ministry stated it was launching an inquiry to investigate these serious allegations.

Washington has criticized South Africa for inviting Iran during a time of brutal crackdowns on protests in the Middle East.

The US contended that the South African military's actions signify a choice to align with Iran, rather than maintaining a neutral stance.

William Gumede, an associate professor at the University of Witwatersrand, remarked on the hypocrisy of the African National Congress's silence on human rights issues in Iran while criticizing other regimes.

The US embassy posts indicated a concern regarding the South African defence minister defying orders to dismiss Iranian warships, labelling Iran's participation as unconscionable amid its suppression of protests.

Further complicating matters, the week-long naval drill dubbed Peace Resolve has involved other Brics+ nations and is led by China, aimed at challenging Western nations' influence.

While Iranian warships were already in Cape Town at the time orders to turn them away were communicated, the outcome of this diplomatic standoff remains to be seen.