Section 268(2) in The Code of Criminal Procedure, 1973
(2)Before making an order under sub-Section (1), the State Government shall have regard to the following matters, namely :-(a)the nature of the offence for which, or the grounds on which, the person or class of persons has been ordered to be confined or detained in prison;(b)the likelihood of the disturbance of public order if the person or class of persons is allowed to be removed from the prison;(c)the public interest, generally.