The CrPC 1973 was replaced by the BNSS 2023 (in force 2024-07-01); no verified section mapping on file for Section 171 — confirm the corresponding provision (savings: Section 531, BNSS 2023).
No complainant or witness on his way to any Court shall be required to accompany a police officer, or shall be subject to unnecessary restraint or inconvenience, or required to give any security for his appearance other than his own bond: Provided that, if any complainant or witness refuses to attend or to execute a bond as directed in Section 170, the officer in charge of the police station may forward him in custody to the Magistrate, who may detain him in custody until he executes such bond, or until the hearing of the case is completed.