Section 20(1) in The Code of Criminal Procedure, 1973
(1)In every district and in every metropolitan area, the State Government may appoint as many persons as it thinks fit to be Executive Magistrates and shall appoint one of them to be the District Magistrate.