
496 P.2d 754 (1972)
Clifford Eugene MARTIN, Appellant,
v.
SHERIFF, CLARK COUNTY, Nevada, Respondent.
No. 6800.
Supreme Court of Nevada.
May 5, 1972.
Robert G. Legakes, Public Defender, Thomas D. Beatty, Deputy Public Defender, Clark County, Las Vegas, for appellant.
Roy A. Woofter, Dist. Atty., and H. Leon Simon, Deputy Dist. Atty., Las Vegas, Robert List, Atty. Gen., Carson City, for respondent.

OPINION
PER CURIAM:
The appellant was charged by criminal complaint with rape (NRS 200.263) and lewdness with a minor (NRS 201.230). The rape count alleged the infliction of substantial bodily harm [NRS 200.263 (1) (a)].
The alleged victim was a 9-year-old girl, whose testimony at the preliminary examination was sufficient to constitute probable cause to believe that the offense had occurred and that the appellant had probably committed it. In support of the substantial-bodily-harm charge, the victim's mother testified that she had called the police because of her daughter's bleeding vagina.
At the conclusion of the preliminary examination, the district attorney moved to strike the portion of the rape charge alleging the infliction of substantial bodily harm, because of a lack of evidence to support it. That motion was granted by the magistrate.
The magistrate then dismissed the rape charge. We cannot perceive upon what authority such a dismissal order was entered, *755 in view of the testimony adduced at the preliminary examination, which showed that a rape had occurred. However, the magistrate did order the appellant bound over to the district court for trial on the charge of lewdness with a minor by the insertion of the penis into the vagina of the child. The district attorney thereupon filed an information charging the crime for which the appellant had been bound over, namely, lewdness with a minor by the insertion of the penis into the vagina of the child.
A petition for a writ of habeas corpus was then filed on behalf of the appellant. In the petition it was contended that, inas-much as the rape charge had been dismissed, and since the language of NRS 201.230 explicitly excludes the act of rape from the lewdness statute,[1] the appellant had been held to answer to a charge that is legally nonexistent.
At the hearing on the writ application, the district judge reviewed the transcript of the preliminary examination and found that it contained sufficient evidence to constitute probable cause to believe that the crime of rape had been committed and that the appellant probably had committed it. He also found the testimony of the child's mother to be sufficient evidence of substantial bodily harm to warrant reinstatement of that charge. As a result, the order of the district court was that the writ of habeas corpus was denied, with leave to the district attorney to file an amended information to charge the crime shown by the preliminary examination transcript as probably having been committed, namely, rape with substantial bodily harm.
The appellant's contention on appeal is that the denial of the writ, with leave to amend, in these circumstances was error, because such a result is not authorized by our statutes. We agree.
The evidence presented by the State at the preliminary examination was sufficient to constitute probable cause to believe that the crime of rape had been committed and that the appellant had probably committed it. The magistrate erred when he ordered the appellant bound over on a charge of lewdness with a minor. The two crimes are rendered mutually exclusive by the language of NRS 201.230(1). On the evidence presented to the magistrate, it was also error for him to order the dismissal of the rape charge.
In the procedural posture in which the habeas petition was presented, the district court was without authority to deny the writ and order the information amended. The only permissible course under the circumstances was to grant the writ with leave to the district attorney to refile the rape charge under NRS 173.035(2).[2] and NRS 178.562(2).[3] Neither NRS 173.095 nor NRS 174.145 nor NRS 34.520 permits the court to order the amendment of an information to restate a *756 charge that has been dismissed by the magistrate at the preliminary examination, even though the magistrate's order was clearly erroneous.[4]
Consequently, we reverse the district court's order, and we authorize the district attorney to refile the charge of rape[5] under NRS 173.035(2) and NRS 178.562(2). Further leave of the court is not necessary. Nor is another preliminary examination required, for we find from the transcript of the one which was conducted that there is probable cause to bind this appellant over for trial on a charge of rape.
NOTES
[1]  NRS 201.230, subsection 1:

"Any person who shall willfully and lewdly commit any lewd or lascivious act, other than acts constituting the crime of rape and the infamous crime against nature, upon or with the body, or any part or member thereof, of a child under the age of 14 years, with the intent of arousing, appealing to, or gratifying the lust or passions or sexual desires of such person or of such child, shall be punished by imprisonment in the state prison for not less than 1 year nor more than 10 years." (Emphasis added.)
[2]  NRS 173.035, subsection 2, in pertinent part:

"If, however, upon the preliminary examination the accused has been discharged, ... the district attorney may, upon affidavit... by leave of the court first had, file an information ... The affidavit mentioned herein need not be filed in cases where the defendant ... has been bound over to appear at the court having jurisdiction."
[3]  NRS 178.562, subsection 2:

"The discharge of a person accused upon preliminary examination shall be a bar to another complaint against him for the same offense, but shall not bar the finding of an indictment or filing of an information."
[4]  The order of dismissal was not upon the motion of the district attorney, nor was the dismissal filed by him pursuant to NRS 178.554, providing for voluntary dismissals; hence, the prohibition of NRS 178.562(1) is not applicable. Nor does Turpin v. Sheriff, 87 Nev. 236, 484 P.2d 1083 (1971), preclude the refiling of the rape charge under NRS 173.035(2), because there the dismissal was voluntarily sought by the State.
[5]  Because the district attorney voluntarily moved to strike that portion of the rape charge alleging the infliction of substantial bodily harm, he is now precluded from realleging it if he refiles the rape charge against the appellant. NRS 178.554 and NRS 178.562.
