By Joe Brock and Mfuneko Toyana

ATTERIDGEVILLE, South Africa (Reuters) - Gladys Sithole had voted for the ruling African National Congress (ANC) ever since its long-jailed former leader Nelson Mandela swept to power in South Africa at the end of apartheid 22 years ago. She did not expect much in return, just a toilet.

Standing in the doorway of her house in Atteridgeville near Pretoria and wrapped in a blanket against the cold, she explained the sea change among ANC supporters in local elections on Aug 3 which nudged South Africa from post-apartheid one-party ANC rule into a new era of uneasy coalitions.

"The ANC promised us many things when they freed us but those things haven't happened," the 64-year-old said at the three-room home she shares with her frail husband and unemployed son in one of the townships blacks were confined to by apartheid.

She is pinning her hopes on the Democratic Alliance (DA), formerly the preserve of South Africa's white minority, while others in Atteridgeville support the Economic Freedom Fighters, a radical party vowing to shift wealth from whites to blacks.

The ANC still scored the most votes across the country but failed to win an outright majority in key urban municipalities, which means all three major parties are now scrambling to build coalitions, by an official deadline of Saturday.

It is a type of politics South Africa has little experience of, requiring compromises so great they threaten to dash the hopes of voters whose patience with politicians is wearing thin.

Successful opposition coalitions could show that the ANC's rivals can run local councils, strengthening their credentials to unseat the ANC nationally in 2019.

But they may also descend into wrangling, slowing decision-making or triggering new elections at a time when Africa's most industrialized country teeters on the verge of recession.

"No one really knows what's going on. It's confusing," said 20-year-old student Wiseman Siyabonga, who stayed loyal to the ANC because of education and housing grants he benefits from.

"The thing with coalitions is no one gets who they voted for."

UNREST

Atteridgeville, the township on the edge of Pretoria where Sithole has lived since 1970, is typical of dozens on the fringes of South African cities that used to be so dominated by the ANC that opponents barely bothered to campaign.

That changed in Atteridgeville after the ANC, without consulting locally, replaced its mayor for the municipality that includes the township after he criticized the party.

Residents of the township barricaded roads, looted shops and set vehicles ablaze during riots in June and the ANC's share of the vote in Sithole's ward fell to 54 percent from 88 percent.

Nationally the ANC won 53 percent, down from 62 percent five years ago, opening the way for a possible challenge to President Jacob Zuma's leadership before the 2019 parliamentary election, in which the winning party's leader becomes president.

ANC Secretary-General Gwede Mantashe told reporters on Sunday the party's leadership was trying to "deal with perceptions of the ANC being arrogant, self serving, soft on corruption and increasingly distant from its social base".

Investors have largely welcomed the election results, and the rand has gained around five percent since the vote.

But future coalitions face the daunting task of improving the lives of millions of South Africans, with a quarter of the potential workforce unemployed and the jobless rate among black people aged 20-24 at almost half, not to mention poor housing.

"It's not nice, especially when it's cold," said Sithole, referring to the rickety cubicles in her own and other yards, which the ANC vowed to replace with inside toilets years ago.

There are 27 municipalities out of 278 where no party won an outright majority, including four urban municipalities wielding budgets totaling around 130 billion rand ($9.65 billion).

The DA, which elected its first black leader, Mmusi Maimane, last year, won the most votes in the symbolically important Nelson Mandela Bay, which includes the manufacturing center Port Elizabeth, and Tshwane, home to the capital Pretoria.

The ANC narrowly won the largest share in economic hub Johannesburg and the neighboring industrial region of Ekurhuleni where the main airport is based.

Julius Malema's three-year-old Economic Freedom Fighters (EFF) has been cast in the role of kingmaker, coming third with 8 percent of the national vote.

The three parties say they are holding talks with one other and other smaller parties but details have been kept secret.

"I think a coalition between DA and EFF could work. They might get something done," said Thabiso Clemenet, 26, an unemployed IT graduate who lives with six family members, aged between 8 and 80, in a two bedroom house in Atteridgeville.

Clemenet points at pot-holed roads that have not been fixed and an empty plot of land where a health clinic was supposed to be built three years ago as examples of the ANC's failure.

But his reasons for voting for the EFF, a party which has struck a chord with many young black men, hint at the difficulty of coalition building. "The EFF seems to offer the most radical offer of change," he said. "That's what we need."

AWKWARD BEDFELLOWS

On the surface, it would seem unthinkable that the pro-business DA with a white support base, could partner with the EFF, which proposes nationalizing mines and banks and redistributing land from whites to blacks without compensation.

The DA and EFF do share common ground, notably an avowed determination not to work with the ANC, and the DA has the track record of a successful coalition with like-minded parties in Cape Town, where it boosted its majority to over two-thirds.

"I've no doubt there will be issues but I think a DA/EFF coalition is the best government citizens could get," said political analyst Prince Mashele.

"The two parties will watch each other so there is no corruption. They will also pull each other toward the center and they should both want to deliver to the people if they are going to convince voters in 2019."

Lingering inequality is a central issue. Black people make up 80 percent of South Africa's 54 million population yet most of the economy remains in the hands of white people, who account for about 8 percent of the population. "We are going to show what can be done," Solly Msimanga, DA mayoral candidate in Tshwane told Reuters, citing the creation of tax free zones outside townships like Atteridgeville where small businesses like bakeries and mechanics could thrive. "You talk about nursery schools and health clinics. There are budgets for these sort of projects but they are not being spent," Msimanga said of projects neglected in the township.

EFF spokesman Mbuyiseni Ndlozi has said the party would announce its decision on coalitions on Wednesday and James Selfe, a senior DA executive who has led the party’s negotiations, said on Tuesday talks were at an advanced stage.

"Everyone is in a position where they know what's on offer, they know what's at stake," Selfe told reporters. "They'll have to take a decision."

But in a country where coalitions remain largely untested, there are many who doubt they can succeed. "There's no way the EFF and DA can work together," said student Siyabonga. "They will fight each other and the people will suffer."

(Editing by James Macharia and Philippa Fletcher)