Cape Town's mayoral committee member for safety and security, Dumisani Ximbi, was rushed out of a public meeting last week after a warning of a plot to assassinate him, his office said on Wednesday.
Ximbi's spokesperson Wesley Douglas said the incident happened on Thursday evening, but was kept under wraps until the city's VIP protection unit had completed a report.
That report had been finished, and a complaint would now be laid with the South African Police Service, he said.
The city said in a statement that security was being stepped up around the city's multiparty government following the incident.
It said the warning of an "imminent attack" came from a senior metro police officer as Ximbi, who is Western Cape chairperson of the United Democratic Movement (UDM), was addressing a community meeting in Khayelitsha.
"I was rushed away just in time," the statement quoted Ximbi as saying. "The information was given by a reliable informant and had included the description of the men who were to carry out the attack and their vehicles.
"As I left, those vehicles pulled up at the hall."
Douglas said the identity of the attackers was not yet known, but that the incident was clearly politically motivated.
Ximbi said he was not accusing any other political party over the incident.
The Democratic Alliance leads a fragile alliance of several parties, including the UDM, in the city. The African National Congress is the opposition in the council.