Justice M Duraiswamy passed the order on a petition by DMK's legal wing secretary MK Giririjan, claiming that the government was preventing Stalin from visiting water bodies which were being desilted by DMK cadres across the state.
The judge said, MK Stalin can visit the tank in Kacharayanpalayam after duly informing the Salem district Collector two days in advance.
The collector shall provide necessary police protection during his visit, he added.
The judge also directed MK Stalin to restrict the number of persons accompanying him to 25 during his visit.
The DMK in its petition wanted the court to restrain the state government from preventing MK Stalin from visiting any part of Tamil Nadu to inspect water bodies.
The main opposition party filed the petition after MK Stalin was detained in Coimbatore by police last month en route to Salem to visit the Kacharayanpalayam tank and also to participate in a human chain protest on the issue of all-India medical entrance examination NEET.
The state government had opposed the petition the ground that such a relief may lead to breach of law and order.