The influential king of the Zulus, South Africa’s largest ethnic group, sought to distance himself on Monday from anti-foreigner comments he made three weeks ago, which the authorities there have called the catalyst for a wave of deadly xenophobic violence.

“We need to make sure no more foreigners are attacked,” the king, Goodwill Zwelithini, said in a speech at a stadium in Durban carried by South African news media. “We must stop these vile acts.”

South Africa’s neighbors have condemned the violence, calling it a stain on the country’s image as the tolerant “rainbow nation” that emerged from apartheid.

The king’s previous comments, made last month in Durban, a coastal city in the Zulu heartland, were part of what he has described as a broad criticism of lawlessness in South Africa.