South African President Cyril Ramaphosa called on Monday for African countries to work together to manage migration, as his government faces mounting pressure over attacks on foreign nationals.

Ramaphosa’s appeal to the Pan-African Parliament follows weeks of anti-migrant protests in South Africa, where xenophobic activists and fringe groups have blamed undocumented migrants from elsewhere in Africa for crime, unemployment and strain on public services.

He warned that unmanaged cross-border movement could undermine security and social order, and said no country could address the challenge alone.

“As African countries, we have to acknowledge and address the conditions that drive migration in the first place,” Ramaphosa told a session of the parliament, which is the legislative body of the African Union.

“We need to work together to address issues like conflict, instability, governance failures, poverty and social discord.”