PretoriaViolence_June212016
Locals walk past a shell of a burnt out truck used to barricade roads by protesters in Atteridgeville a township located to the west of Pretoria, South Africa on June 21, 2016. REUTERS/Siphiwe Sibeko

Protesters burnt buses and set tires on fire to barricade roads in South Africa's capital on Tuesday after the ANC named a mayoral candidate not nominated by the ruling party's regional branches.

The violence spread overnight from the townships and started after a member of the ANC was shot dead on Sunday as factions clashed at a meeting in Pretoria to decide on the candidates for mayor of Tshwane municipality where Pretoria is located.

The ANC then named senior party member and former cabinet minister, Thoko Didiza, as its candidate for Tshwane, saying that it made the decision after wrangling between members at the party's headquarters over who should lead the municipality.

Residents want the incumbent mayor, Kgosientso Ramokgopa, to be allowed to run on the ANC ticket, TV station eNCA reported, but in an interview with the 24-hour news channel, Ramokgopa backed Didiza's selection and called for calm.

The ANC said its members were not to blame for the violence.

"This is not a result of the nomination of the mayor in Tshwane, it's thuggery," ANC Secretary General Gwede Mantashe told eNCA.

Local elections in August pose a major test for the ANC as it gears up for a 2019 presidential vote in the face of a slowing economy and a strong challenge from the opposition.

Any defeats could hurt the party which has been in power since the end of white-minority rule in 1994 but is seen as losing its touch in areas - including Pretoria - where it was once unassailable.