Section 197(1) in The Code of Criminal Procedure, 1973
(1)When any person who is or was a Judge or Magistrate or a public servant not removable from his officer save by or with the sanction of the Government, is accused of any offence alleged to have been committed by him while acting or purporting to act in the discharge of his official duty, no Court shall take cognizance of such offence except with the previous sanction-(a)in the case of a person who is employed or, as the case may be, was at the time of commission of the alleged offence employed, in connection with the affairs of the Union, of the Central Government;(b)in the case of a person who is employed or, as the case may be, was at the time of commission of the alleged offence employed, in connection with the affairs of a State of the State Government :[Provided that where the alleged offence was committed by a person referred to in clause (b) during the period while a Proclamation issued under clause (1) of Article 356 of the Constitution was in force in a State, clause (b) will apply as if for the expression "State Government" occurring therein, the expression "Central Government" were substituted.] [Added by Act 43 of 1991, Section 2 (w.e.f. 2-5-1991).][Explanation. - For the removal of doubts it is hereby declared that no sanction shall be required in case of a public servant accused of any offence alleged to have been committed under section 166A, section 166B, section 354, section 354A, section 354B, section 354C, section 354D, section 370, section 375, section 376, [section 376A, section 376AB, section 376C, section 376D, section 376DA, section 376DB,] [Inserted by Criminal Law (Amendment) Act, 2013 ] or section 509 of the Indian Penal Code.] [Inserted by Act 63 of 1980, Section 3 (w.e.f. 23.9.1980).]