CrPC Section 20
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.
2. The State Government may appoint any Executive Magistrate to be an Additional District Magistrate, and such Magistrate shall have the powers of a District Magistrate under this Code or under any other law for the time being in force as may be directed by the State Government.
3. Whenever, in consequence of the office of a District Magistrate becoming Vacant, any officer succeeds temporarily to the executive administration of the district, such officer shall, pending the orders of the State Government, exercise all the powers and perform all the duties respectively conferred and imposed by this Code on the District Magistrate.
4. The State Government may place an Executive Magistrate in charge of a sub-division and may relieve him of the charge as occasion requires; and the Magistrate so placed in charge of a sub-division shall be called the Sub-divisional Magistrate.
4A. The State Government may, by general or special order and subject to such control and directions as it may deem fit to impose, delegate its powers under Sub-Section (4) to the District Magistrate.
5.Nothing in this section shall preclude the State Government from conferring. Under any law for the time being in force, on a Commissioner of Police, all or any of the powers of an Executive Magistrate in relation to a metropolitan area.