Despite rising anti-immigrant sentiment, data shows foreign nationals are not leaving South Africa in significant numbers, challenging the narrative of an immigration crisis.

South Africa has seen a wave of anti-immigrant protests, which have sometimes turned violent, in recent weeks.

Hundreds of foreign nationals have sought refuge in community halls along South Africa’s south coast, saying they fled their homes after mobs went door...