JOHANNESBURG, South Africa - A wave of violence against immigrants that left 56 people dead and forced 30,000 from their homes has subsided, South Africa's safety and security minister said yesterday.

Police reported isolated incidents of looting and shacks being set ablaze during the weekend, but Safety and Security Minister Charles Ngakula said that attacks against immigrants had slowed. "The situation is under control," he told reporters.

Foreigners continued to journey home to neighboring countries yesterday, while thousands remained in makeshift camps after fleeing stick- and knife-wielding mobs of South Africans, who accuse immigrants of taking jobs and blame them for crime.

The violence, which has gripped South Africa for more than two weeks, has centered on squatter camps and notoriously bleak dormitories built during the apartheid era for single men who were allowed to work in the cities but not to bring their families.

The attacks spread to Cape Town on Friday, and more than 10,000 people spent the weekend in churches and community centers. City authorities also set up six special sites as dedicated camps for the displaced.

More than 1,300 people were being housed at a camp near Cape Point, one of South Africa's most famous tourist attractions. Hundreds more, mainly Somalis, gathered outside the gates as disaster-management teams inside put up giant tents and installed lavatories. A large contingent of armed police tried to quell tensions among the crowd.

Many blamed the South African government for doing too little, too late.