Any police officer may detain any person who he deems to be a necessary witness to a crime; provided, however, within 24 hours, including Sundays and holidays, he shall be brought before a justice of the superior court who may, upon the showing that the testimony of said person is necessary in any court, release the person on personal recognizance or take the recognizance of the witness in such sum as the justice may deem reasonable for his appearance before the court.
RSA 597:22
RS 222:5. CS 237:5. GS 240:16. GL 258:16. PS 252:22. PL 366 :33. RL 425:33. RSA 597:22. 1959, 159:1. 1965, 86:5. 1969, 78:7. 1975, 407:1, eff. Aug. 15, 1975.