The three-part interdict was granted by the labour court in Cape Town.
It orders Samwu members not to engage in intimidation or violence and instructs people in essential services to return to their posts.
And it further orders workers to adhere to the rules of picketing and strike action.
The union says it will have no problem abiding by this interdict.
Strikers pressing for an 18 per cent pay rise – three times what local authorities are offering –set fire to rubbish bins and smashed windows in the Cape Town city centre earlier this week.
They have also run amok in Durban, Pietermaritzburg and Pretoria.
They have threatened to bring the nation’s commercial capital Johannesburg to a standstill today.
Support for the strike has been poor – particularly in the most populous province of Gauteng
The union says it is dealing with charges of corruption among its leadership.
Many members say internal difficulties are keeping them from supporting the strike.