OPINION
Per Curiam:On January 31, 1978, the preliminary examination of Clarence Clark was scheduled for May 2, 1978. Clark appeared at the appointed time and the examination commenced. After a short period of time, the magistrate, over Clark’s objection, continued the examination because the prosecuting attorney *365had not arranged to obtain a grant of immunity for the prosecuting witness and was, therefore, not prepared to proceed.
Clark then petitioned for a writ of habeas corpus and has appealed from the order denying the requested relief.
We have previously held that when a prosecuting attorney is not prepared to go forward with a scheduled preliminary examination he may set forth reasons why he may be entitled to a continuance by filing an affidavit pursuant to DCR 21. See Hill v. Sheriff, 85 Nev. 234, 452 P.2d 918 (1969). We have also held that, under certain circumstances, the prosecuting attorney may show the reasons that may warrant a continuance by tendering “sworn testimony” in lieu of the written affidavit required by Hill. Bustos v. Sheriff, 87 Nev. 622, 491 P.2d 1279 (1971). See Reason v. Sheriff, 94 Nev. 300, 579 P.2d 781 (1978).
Here, the prosecuting attorney neither filed an affidavit nor tendered sworn testimony. Rather, he attempts to distinguish Hill and Bustos arguing that they “are obviously inapplicable” because their requirements “speak only to continuances sought by a party.” The suggested distinction is not persuasive. The prosecuting attorney had more than three (3) months to arrange for a grant of immunity to his witness. He did not do so and he failed to follow the proper procedure in tendering the reason for the omission. Accordingly, we reverse and remand this case to the district court with instructions to grant Clarence Clark’s petition for the writ of habeas corpus. McNair v. Sheriff, 89 Nev. 434, 514 P.2d 1175 (1973).