Zambia's United Democratic Alliance presidential candidate Hakainde Hichilema waves to his supporters as he leaves the supreme court in Lusaka after filing his nomination papers August 12, 2006. Zambia will hold its presidential elections on September 28, 2006. REUTERS/Salim Henry (ZAMBIA)

Race became a substantial ingredient in South Africa’s local government election campaign last week, largely through President Jacob Zuma’s persistent characterisation of the opposition DA as a racist white party, and its leader Mmusi Maimane, as a white “stooge”.

That didn’t prevent the ANC losing several metros, but maybe they would have lost more without it. Who really knows?

Thanks to Zuma, the race card was out in the open.

But what about tribal ethnicity? Is that the elephant in the room in South African politics?

Some analysts privately suggested after the ANC’s watershed elective conference at Polokwane in 2007 that Jacob Zuma had defeated Thabo Mbeki because he had assembled an anti-Xhosa coalition.

That might have been a politically-incorrect interpretation, but with all the Zuma supporters running around at the time wearing T-shirts proclaiming “100 percent Zuluboy”, you could hardly reject it out of hand.

And last week there were whispers that the ANC lost Nelson Mandela Bay because of a revenge vote by the Xhosa.

We may never know if any of that is true, not least because it’s not publicly discussed.

But even if it is a factor, we should all be grateful that it’s not nearly as much of a factor as in many other countries around the continent.

Like Zambia. It is going to the polls on Thursday for presidential and parliamentary elections and, if one can believe much of the commentary, tribe is a major factor.

President Edgar Lungu, leader of the Patriotic Front, is facing a very fierce challenge from his old rival, Hakainde Hichilema, of the United Party for National Development (UPND).

Lungu defeated Hichilema by only 27 000 votes in the January 2015 presidential by-election that followed the death of President Michael Sata.

Sata was a member of the largest ethnic group, the Bemba, from the north of the country, and made the Patriotic Front a platform for Bemba advancement, according to the journal Africa Confidential.

Conversely, Hichilema is a member of the second-largest group, the Tonga, from the south, and his UPND attracts most of the Tonga vote.

According to the journal, all sorts of tribal balancing and coalition forming has been going on in the run-up to the elections.

Lungu himself is not a Bemba. He is from the eastern region, though it does not seem to be clear from which group. He does not make an issue of it because he is ostensibly against tribalism.

There are no Bembas in the PF’s top ranks, and Lungu ­denounces Hichilema as a tribalist and bans his own party – at least publicly – from playing the tribal card.

Hichilema is apparently taking advantage of Lungu’s non-tribalism by shoring up his own Tonga support, as well as trying to encroach on the PF’s traditional support among the Bemba by appointing a Bemba, Bwalya Mwamba, as his running mate.

Mwamba was a firm Sata loyalist who defected when Lungu won the fierce battle within the PF to win the party’s candidature for the 2015 elections.

Africa Confidential suggests ethnicity and personalities are important factors in the election, because ideology is not. That is no doubt largely true, as it often is elsewhere on the continent.

But it does not seem to be entirely true.

Lungu is a populist and is hoping to capitalise on the substantial expenditure on infrastructure, mainly roads, since he took over. But these have rocketed Zambia’s international debt, at a time of steeply declining revenues because of the fall in the prices of copper, the country’s main earner of foreign exchange.

Hichilema, a businessman, believes there is a need to rein in public spending to balance the books.

Though that appeals to international investors and the likes of the World Bank and the International Monetary Fund, it’s probably true that that is not something that resonates much with voters, and so he’s not giving it too much emphasis.

Sunford Mavu, chairman of the UPND’s South African branch, says if Hichilema is elected, he will also raise agriculture, which he says has long been neglected, to its rightful place at the top of the priority list in Zambia’s economy.

The most alarming thing about Lungu, though, is his intolerance of criticism, which was not apparent when he took over.

This year he shut down the Zambian Post, the country’s most credible newspaper, because of its sharp criticism of his policies.

The official reason for the closure was the Post’s tax arrears, but this was clearly spurious as government-supporting papers had similar tax problems, but have not been touched.

Lungu has defied several court orders to allow the Post to re-open.

Even more worrying is the widespread belief that Lungu’s government will manipulate the vote if it goes Hichilema’s way. That could provoke violent demonstrations, Mavu says, though he believes that Lungu would eventually have to back down if it does.

And he is also pinning his hopes on the army, which he says observes a tradition of political impartiality.