A wall collapsed at Demba Diop stadium in Dakar as police fired tear gas at both sets of supporters after the game.
Two people were killed in a crush of football fans on Saturday at the South African stadium that hosted the 2010 World Cup final, police and officials said.
The incident occurred at a pre-season local derby between Kaizer Chiefs and Orlando Pirates, the country’s most popular teams, both from Soweto.
“I can confirm the death of two people,” police spokeswoman Lorraine van Emmerik, told AFP news agency.
She said several other people had also been injured when “a rolling mass of people were trying to get into the stadium” south of Johannesburg.
Police have launched an investigation into the fatal incident.
In a statement cited by an online football website KickOff, the match sponsors Carling Black Label also confirmed “two fatalities caused by blunt force trauma”.
They said one fan was critically injured and 16 other spectators suffered minor injuries.
The brewer said it was “saddened by the fatalities” from the crush caused by “a number of people who attempted to push through the stadium gates”.
Match tickets were sold out two weeks before the game.
Local media reports suggested fake tickets had gone on sale, while some analysts said fans have a tendency to enter stadiums late.
Public and private broadcasters cited officials saying the crush happened outside a gate at the FNB stadium which hosted the final of the World Cup seven years ago, which was won by Spain.
Hlomla Hlangani, an intern video journalist with public broadcaster SABC who was at the stadium, said the trouble occurred shortly after the match had started.
He said stadium security had to call in for police reinforcements after they were overpowered by a crowd of fans trying to rush through the gates.
Michael Sun, a Johannesburg municipal councillor responsible for public safety, spoke of a “stampede”.
“Situation report from FNB Soweto Derby?Stampede reported with multiple injuries, 2 confirmed fatal,” Sun wrote on Twitter.
The match carried on despite the tragedy at the stadium, which has an official capacity of 94,000 and was won 1-0 by the Kaizer Chiefs.
South African Football Association (SAFA) said it was “deeply saddened by the tragedy”.
“A football match is supposed to be a place of entertainment. What happened at FNB Stadium is very unfortunate,” Danny Jordaan, SAFA president, said in a statement.
The two worst football tragedies in South Africa involved matches between the same clubs – in 2001 when 43 people were killed, and in 1991, when the death toll was 42.