KHAYELITSHA, South Africa — When the gunmen materialized out of a soaking downpour on a Friday evening in August, weapons crackling, the taxi owner tried to run.

“Unfortunately,” he said, “I was late.”

The taxi owner is 54, a beefy man with a shaved head, propped in a chair beside his bed at Groote Schuur Hospital in Cape Town. The seven bullet wounds in his legs are shrouded in a blanket. He may yet lose a foot, but he has other worries. “Do not put my name on any paper,” he said. “If I see my name, I will hold you responsible for my death.”

Melodramatic, maybe. Or maybe not. After a few years of relative calm, this nation’s so-called taxi wars have flared up again in earnest.

In the last two decades, thousands of South African taxi owners, drivers and passengers have been killed and many more have been wounded in one of the strangest guerrilla wars to bedevil any nation. The combatants are rival cartels that control thousands of low-cost minibuses, or “combis,” that haul a large share of South Africa’s urban commuters and much of the nation’s intercity traffic. Combi drivers are mostly poor, and competition is fierce. Many operate illegally, and even legitimate ones may poach others’ routes to grab as many fares as possible.