Section 146(1) in The Code of Criminal Procedure, 1973
(1)If the Magistrate at any time after making the order under sub-section (1) of section 145 considers the case to be one of emergency, or if he decides that none of the parties was then in such possession as is referred to in section 145, or if he is unable to satisfy himself as to which of them was then in such possession of the subject of dispute, he may attach the subject of dispute until a competent court has determined the rights of the parties thereto with regard to the person entitled to the possession thereof :Provided that such Magistrate may withdraw the attachment at any time if he is satisfied that there is no longer any likelihood of breach of the peace with regard to the subject of dispute.