Correctional Services said that “matters are under control” at Johannesburg’s Sun City Prison on Wed.
The community of Alexandra, Johannesburg, has vowed never again to attack foreigners living in their area.
The foreigners were welcomed back to their homes at the weekend.
Four months ago the township erupted in violence. The community did not want foreigners in their area.
The violence spread to other townships around the country, leaving 62 people dead. Thousands of foreigners were forced out of their homes and sought refuge at local police stations and community halls.
Businessman Allen Mnguni, 40, said: "I do not have a problem if they come back. We have a family living with us in the yard and we are happy to have them around. I have never had any problems with a foreigner.
"We are all Africans and should treat each other the same."
Fani Mngomezulu said: "We welcome them. But we want the government to monitor them and address problems we face with them.
"We also want them to be in the country legally so that when they commit crimes they can be easily found."
But Vusi Mtshali, 37, was not happy.
"I don't want them," he said. "The government must take them to one place and monitor them. These people have taken our jobs. Most [immigrants] are illegal."