The official text
Old and new, side by side
Code of Criminal Procedure, 1973
Section 151 Arrest to prevent the commission of cognizable offences
(1) A police officer knowing of a design to commit any cognizable offence may arrest, without orders from a Magistrate and without a warrant, the person so designing, if it appears to such officer that the commission of the offence cannot be otherwise prevented.
(2) No person arrested under sub-section (1) shall be detained in custody for a period exceeding twenty-four hours from the time of his arrest unless his further detention is required or authorised under any other provisions of this Code or of any other law for the time being in force.
Bharatiya Nagarik Suraksha Sanhita, 2023
Section 170 Arrest to prevent commission of cognizable offences
(1) A police officer knowing of a design to commit any cognizable offence may arrest, without orders from a Magistrate and without a warrant, the person so designing, if it appears to such officer that the commission of the offence cannot be otherwise prevented.
(2) No person arrested under sub-section (1) shall be detained in custody for a period exceeding twenty-four hours from the time of his arrest unless his further detention is required or authorised under any other provisions of this Sanhita or of any other law for the time being in force.
The texts are India Code’s. The amendment markers and footnotes of the official print are left out, so the old section reads as it stood when it was repealed; State amendments are not shown. The PDFs linked below carry the full history.