Johannesburg - Comments made by Water and Sanitation Minister Nomvula Mokonyane on social media in no way influenced the recent attacks on foreign shop owners in Soweto, the department said on Thursday.
"The comments the minister made early in January have no bearing on the protest in Soweto and other affected areas in Gauteng," said chief of staff Collin Pitso.
On 2 January Mokonyane posted a Facebook status expressing shock at the number of township shops owned by foreigners.
"Almost every second outlet [spaza] or even former general dealer shops are run by people of Somali or Pakistan origin in a yard that we know who the original owners were," she wrote.
"I am not xenophobic fellow comrades and friends but this is a recipe for disaster which I will raise with the authorities relevant. I also intend to get to hear as to how my local council is enforcing business and by laws in Kagiso.
"This phenomenon needs a coherent formal attention. Our townships cannot be a site of subtle takeover and build up for other situations we have seen in other countries. I am ready to state my view formally in defence of our communities."
Pitso said the looting of foreign-owned businesses was "unfortunate and can never be condoned".
"The minister wants to emphasise the importance of cross-pollination of business ideas and sharing or transfer of entrepreneurial skills as part of the revitalisation of the township economy.
"This will go a long way in creating and enhancing social cohesion," he said.
Businesses that operated in residential homes also needed to comply to municipal by-laws, he said.
Mokonyane's message elicited 59 comments on the social network with some in agreement with the minister and others condemning her message.
Widespread violence and looting of foreign-owned shops swept across parts of Soweto after a teenager was shot dead last Monday, allegedly by a foreign shopkeeper in Snake Park near Dobsonville.
By Thursday last week the violence and looting had spilled over to Kagiso in the West Rand and Sebokeng in the Vaal.
Seven people had been killed and 178 arrested.