*370OPINION
Tener seeks a writ of prohibition forbidding the respondent district judge from conducting a rehearing on his petition for a writ of habeas corpus, and a writ of mandamus commanding the district judge to sign an order discharging him from custody.
After holding a hearing on Tener’s petition for a pretrial writ of habeas corpus, the respondent district judge ruled from the bench that the writ was granted and made permanent. It is undisputed that no written order discharging Tener from custody was signed by the judge or filed by the clerk. The state then moved for a “rehearing” on the petition, which the district judge granted. Tener contends that a rehearing cannot be granted in a habeas corpus proceeding. Eureka Bank Cases, 35 Nev. 151, 129 P. 308 (1912).
Under the statutory provisions for writs of habeas corpus, the discharge of the petitioner is a judgment, NRS 34.570, which must be memorialized in an order, NRS 34.590. Accordingly, we hold that until a written order discharging the habeas corpus petitioner is signed by the judge and filed by the clerk, seeNRCP 58(c), the Eureka Bank rule does not apply, and the judge retains the power to reconsider his decision. See Miller v. Hayes, 95 Nev. 927, 604 P.2d 117 (1979). We therefore deny the petition for writs of prohibition and mandamus.