The South African Football Association (SAFA) has confirmed a planned friendly with Madagascar is off after the opposition pulled out.

Madagascar were hastily lined up for Saturday's game at Orlando Stadium in Soweto, Johannesburg after Zambia pulled out of the scheduled fixture for safety reasons.

But the Madagascar Football Association (MFA) announced on Thursday they are also withdrawing from the game.

"After having consulted with the various national institutions of Madagascar, particularly concerning the security of the team of Madagascar and its Malagasy nationals in South Africa, it was found essential and judicious to decline the invitation," a statement read.

"The Madagascar Football Association apologises to the South African Football Federation for their efforts to organize this match, and also to the Malagasy fans who were looking forward to the match."

The decision to call off the game comes amid civil unrest in Johannesburg and Pretoria, with both cities having been the scene of looting and violence targeting foreigners.