A South African art gallery has agreed not to display a controversial painting of President Jacob Zuma with his genitals exposed after reaching a deal with the ANC.

The painting, "The Spear," hangs in its Johannesburg gallery

The painting has sparked fierce debate about the balance between freedom of expression and the right to dignity.

Hundreds of ANC supporters protested outside the gallery on Tuesday.

The painting, The Spear, was defaced last week. It will also be removed from the Goodman Gallery’s website.

Under the deal, the ANC has agreed to drop its legal action against the gallery.

On Monday, South Africa’s City Press newspaper said it was removing the image of the painting from its website following threats by the ANC.