JOHANNESBURG, July 13 (Reuters) - Crowds clashed with police and ransacked or set ablaze shopping malls in cities across South Africa on Tuesday, with dozens of people reported killed, as grievances unleashed by the jailing of ex-president Jacob Zuma boiled over into the worst violence in years.

Protests that followed Zuma's arrest last week for failing to appear at a corruption inquiry have widened into looting and an outpouring of general anger over the hardship and inequality that persist 27 years after the end of apartheid.

Poverty has been exacerbated by severe social and economic restrictions aimed at blocking the spread of COVID-19.

Security officials said the government was working to halt the spread of the violence and looting, which has spread from Zuma's home in KwaZulu-Natal (KZN) province to the country's biggest city Johannesburg and surrounding Gauteng province, and to the Indian Ocean port city of Durban.

The South African Police Service (SAPS) said late Tuesday that as many as 72 people have lost their lives and 1,234 people have been arrested in the last few days of protests which have now turned into rampant looting and riots.

There have been reports of sporadic violence in two others provinces as well and "law enforcement officers patrolling identified areas of threat in an effort to deter possible opportunistic criminality," SAPS said.

Soldiers have been sent onto the streets to try to contain the unrest.

Zuma, 79, was sentenced last month for defying a constitutional court order to give evidence at an inquiry investigating high-level corruption during his nine years in office until 2018.

He also faces trial in a separate case on charges including corruption, fraud, racketeering and money laundering. He pleaded not guilty in court in May.

Zuma's foundation said there would be no peace in South Africa until the former president was released from jail.

"Peace and stability in South Africa is directly linked to the release of President Zuma with immediate effect," it said in a Tweet.

"The violence could have been avoided. It started with the decision of the constitutional court to detain president Zuma ... This is what gave anger to the people," a spokesman for the foundation, Mzwanele Manyi, told Reuters separately.

Troops moved into flashpoints on Tuesday as outnumbered police seemed helpless to stop the unrest, with columns of armoured personnel carriers rolling down highways.

The bodies of 10 people were found on Monday evening after a stampede at a Soweto shopping mall, Gauteng premier David Makhura said.

Hundreds of looters raided warehouses and supermarkets in Durban, one of the busiest shipping terminals on the African continent and an import-export hub.

Outside a Durban warehouse of retailer Game, looters stuffed cars with electronic goods and clothes, a Reuters witness said. Inside, the floor was a mess of discarded packaging as the crowd emptied the shelves.

The rand , which had been one of the best performing emerging market currencies during the pandemic, dropped to a three-month low on Tuesday, and local and hard currency bonds suffered.

Shares of banks, real estate companies and retail firms that are largely dependent on the performance and outlook of the local economy also tanked on Tuesday.