By James Macharia

JOHANNESBURG (Reuters) - South Africa holds local government elections on Wednesday in what looks likely to become a referendum on President Jacob Zuma's scandal-plagued leadership and on an economy forecast to stagnate this year.

The African National Congress (ANC) has held sway in the main cities since white-minority rule in Africa's most industrialized country ended 22 years ago. Any defeats could erode the party's support before a general election in 2019.

Opinion polls see a close race in those cities, including the capital Pretoria, economic-hub Johannesburg and the symbolic Nelson Mandela Bay named after the anti-apartheid icon.

"The way the opposition parties have carried out their campaigns and the way the ANC has responded, show the vote will be a referendum on Zuma and the performance of his government on the national economy as well as the local level," BNP Paribas Securities South Africa political analyst Nic Borain said.

Zuma, who has been beset by a series of scandals, survived an impeachment vote in April after the Constitutional Court said he breached the law by ignoring an order to repay some of the $16 million in state funds spent on renovating his home.

In December, he was widely criticized for changing his finance minister twice in a week, sending the rand plummeting and alarming investors.

Zuma has rejected the accusations, saying he is fit to lead. The ANC party backed him to defeat an impeachment vote.

But anger is rising in a country where one in four people are unemployed and the central bank expects zero growth this year. The economy is on the brink of a recession after shrinking by 1.2 percent in the January-March period.

That, on the back of a series of political scandals around Zuma, is stoking fears of a downgrade by ratings agencies to "junk" status in reviews expected by December.

People are feeling the pinch as the economy treads water.

"I'm in this shack because I can't afford rent," said Sibabalo Sibisi, who lives in Alexandra township, a shantytown near Sandton, Africa's richest suburb in Johannesburg.

"It's not nice living like this, with no water or electricity, and when it rains we have to use buckets to scoop the water out of our shacks."

The main opposition Democratic Alliance (DA), a mainly white party, last year named Mmusi Maimane, a black man, as its leader. Seeking to widen its appeal in the "rainbow nation", it has been courting ANC supporters before the vote.

The leftist Economic Freedom Fighters (EFF) is led by firebrand Julius Malema, Zuma's one-time protege and former ANC youth leader. It is seen attracting the young and unemployed with a promise to redistribute among poor blacks wealth still largely held by whites.

An opinion poll by Ipsos released last week shows the ANC is expected to garner 47 percent of the vote against 43 percent by the DA in Tshwane municipality, which includes Pretoria.

In Johannesburg, the ANC has a 46 percent lead to the DA's 41 percent, while in Nelson Mandela Bay, the DA is ahead with 44 percent to ANC's 37 percent.

"Major metropolitan areas that investors know well are in close contention," London-based Nomura emerging markets analyst Peter Attard Montalto said in a note. "Overall, we think one or possibly two metros could fall from ANC majority control."

(Editing by Tom Heneghan)