Section 2 of Prisoners Act, 1956

Section 30 The removal of lunatic prisoners to a lunatic asylum or other safe custody. The State Government can order the removal if they believe a prisoner is of unsound mind.