South Africa can uphold its Pan-African ideals while enforcing its immigration laws, recovering legitimate repatriation costs and demanding greater responsibility from neighbouring governments. But firm border control must never become a licence for xenophobia or vigilantism.