
392 P.2d 509 (1964)
80 Nev. 279
Nila VICTORIA, Appellant,
v.
C.W. YOUNG, Sheriff of Washoe County, Respondent.
No. 4731
Supreme Court of Nevada
May 26, 1964
Jerry Carr Whitehead, of Reno, for Appellant.
Harvey Dickerson, Atty. Gen., Carson City, William J. Raggio, Dist. Atty., Herbert F. Ahlswede, Deputy Dist. Atty., Reno, for Respondent.
McNAMEE, Justice.
On November 15, 1963 appellant was arrested by the Reno City Police Department. On November 27, 1963 a criminal complaint charging him with forging the handwriting of one Gardner to a $10 traveler's check was filed in the Justice's Court of Reno Township, at which time a warrant of arrest issued, and he was taken before a *510 magistrate for arraignment. His preliminary hearing was held January 13, 1964 and on that day he was bound over to the District Court to answer upon a charge of forgery. On January 20, 1964 an information was filed against him in the District Court charging him with the said forgery. He was brought before the District Court on January 31, 1964, at which time he requested that counsel be appointed to represent him. Jerry Carr Whitehead was appointed by the court as his counsel and upon appellant's request arraignment was continued until February 4, 1964. At all times since November 15, 1963 appellant has been in custody.
On February 3, 1964 appellant filed a petition in the court below for a writ of habeas corpus upon the ground that he was incarcerated for an excessive period of time before being brought in front of a magistrate and upon the ground that he was not represented by counsel at the preliminary hearing. A writ was issued and after a hearing thereon the lower court made an order quashing the writ upon the ground that appellant's illegal confinement had already taken place and had ended and that he was then legally held in custody. Appeal is from this order.
As heretofore stated, the petition for habeas corpus was based upon appellant's incarceration for the 11-day period before he was brought before the magistrate and also upon the ground that he had no counsel at the preliminary hearing. Although not pleaded, appellant in the court below stated one more reason why he should be discharged from custody under the writ of habeas corpus, to wit, the delay of 47 days after the complaint was issued before his preliminary examination was held.
In his oral argument herein appellant represented to this court that he was concerned only with the delay from the time of his arrest on November 15, 1963 until the time of his preliminary hearing on January 13, 1964.
NRS 171.300 (1) provides that when an arrest is made without a warrant "the person arrested must, without unnecessary delay, be taken before the nearest or most accessible magistrate, * * * and a complaint, stating the charge against the person, must be laid before such magistrate."
When the defendant is brought before the magistrate upon an arrest, NRS 171.370 provides that the magistrate must immediately inform him of the charge against him and of his right to the aid of counsel. The record shows that this was done.
NRS 171.380 provides: "If the defendant requires the aid of counsel, the magistrate must immediately after the appearance of counsel, or if after waiting a reasonable time therefor none appears, proceed to examine the case."
Upon completion of a preliminary hearing wherein the magistrate orders an accused held to answer the charge contained in the complaint and orders him committed, the accused thereafter is legally detained in custody.
It is appellant's contention however that prior thereto he was not legally detained in custody because he was not taken before a magistrate until 11 days after his arrest in violation of NRS 171.300(1), and because his preliminary hearing was not held until 47 days after his arraignment before the magistrate in violation of NRS 171.380.
NRS 34.500 provides that when it appears on the return of the writ of habeas corpus that the prisoner is in custody by virtue of process from any court of this state (the said order of commitment "is a process" within the meaning of this statute[1]), such prisoner nevertheless may be discharged "[w]hen the imprisonment was at first lawful, yet by some act, omission or event, which has taken place afterwards, *511 the party has become entitled to be discharged."
Appellant concedes that upon his initial arrest his imprisonment was lawful.
While it may be true that during the 11-day period from the time of his arrest to the time he was taken before the magistrate his imprisonment at first lawful became unlawful because of unnecessary delay, and again became unlawful sometime during the period after his arraignment in the Justice's Court and before his preliminary hearing it does not follow that his imprisonment after the order of commitment is also unlawful.
As heretofore stated, the order of commitment was dated January 13, 1964 and on January 20, 1964 the information was filed against him in the District Court. Appellant does not complain of this delay of seven days in filing the information.
The District Attorney was required by NRS 178.495 to bring the defendant to trial within the 60-day period following January 20, 1964, the date the information was filed. That period had not expired when the petition for a writ of habeas corpus was filed in the lower court nor had it expired on February 14, 1964 when a hearing was had upon the writ.
We have concluded that regardless of the fact that for some periods of time prior to the order of commitment the appellant might have been unlawfully detained of his liberty the subsequent preliminary examination and commitment do not become illegal because of the previous wrongful detention. United States v. Mitchell, 322 U.S. 65; cf. State v. Maldonado, 92 Ariz. 70, 373 P.2d 583; cf. Morse v. United States, 5 Cir., 256 F.2d 280. In other words, while a writ of habeas corpus would be available during a period of illegal detention it will not issue once the detention becomes legal.[2] United States v. Kenton, 2 Cir., 287 F.2d 534; United States v. Universita, D.C., 192 F. Supp. 154.
Appellant's argument that he has been denied his right to a speedy trial is without merit. State v. Maldonado, 92 Ariz. 70, 373 P.2d 583.
Appellant contends that he was entitled to counsel at his preliminary hearing.
The record shows that at the time of his arraignment in the Justice's Court, appellant was advised by the presiding magistrate of his right to counsel at the preliminary hearing which would follow. It does not appear that appellant at any time requested the aid of counsel. He appeared at the preliminary hearing without counsel, was informed of the charge against him, was advised again of his right to counsel, and he was instructed with respect to the procedure.
Three recent decisions of the United States Supreme Court hold that an indigent accused has the right to have counsel appointed to assist him in his defense.
In Gideon v. Wainwright, 372 U.S. 335, the defendant asked the court to appoint counsel for him. The request was denied. Gideon was forced to conduct his own defense at the trial. The court there held that the refusal of a state trial court to appoint counsel for one prosecuted for a felony violates the United States Constitution. The decision in this case is limited to the right of an indigent defendant to be represented by counsel at his actual trial.
Hamilton v. Alabama, 368 U.S. 52, was a capital case. It holds that an accused's right to counsel includes the right to the assistance of counsel at any critical stage of a state's criminal procedure, such as arraignment. It further holds that under Alabama law an arraignment is a critical stage because in *512 Alabama the law requires the plea then to be entered.
White v. Maryland, 373 U.S. 59, 83 S.Ct. 1050, 10 L.Ed.2d 193, also was a capital case. The accused pleaded guilty when arraigned at the preliminary hearing, at which time he was not yet represented by counsel. At his formal arraignment, he pleaded not guilty. The court there said: "Whatever may be the normal function of the `preliminary hearing' under Maryland law, it was in this case as `critical' a stage as arraignment under Alabama law. For petitioner entered a plea before the magistrate and that plea was taken at a time when he had no counsel," and was later received in evidence at the trial.
Each of these three cases is distinguishable from the case before us.
In Nevada a preliminary hearing may be waived by an accused. No plea is entered until after an information is filed in the District Court. Upon an accused's arraignment in the district court and before entry of plea, he is advised of his right to counsel, and if he desires and is unable to employ counsel, the court must assign counsel to defend him, NRS 174.120, at the expense of the county, NRS 7.260. Consequently at his arraignment he will be represented by counsel if he so desires.[3] Under these circumstances the preliminary hearing in Nevada is not a critical stage of the state's criminal procedure. An information takes the place of an indictment, and an accused is not entitled to be present with or without counsel before the grand jury which finds the indictment. NRS 172.320(3). He is not even entitled to a transcript of the grand jury proceedings. NRS 172.330.
Appellant argues that a preliminary hearing is a critical stage of the procedure leading to the trial of an accused, because testimony taken there may be used by either party on the trial when the personal attendance of any witness cannot be had in court. NRS 171.405 (10). We are of the opinion that this argument has no merit. Counsel anticipates that he will be prejudiced at the trial in the event the trial court should receive in evidence any testimony taken at the preliminary hearing. We do not believe that a trial court would invite such error in a case where an accused did not have the opportunity to cross-examine witnesses through counsel. Until such testimony is received in evidence at the trial, appellant cannot claim prejudice.
Affirmed.
BADT, C.J., and THOMPSON, J., concur.
NOTES
[1]  See LaVergne v. Fogliani, 76 Nev. 431, 357 P.2d 116.
[2]  For an unlawful imprisonment an accused has a civil remedy against the wrongdoer. See Lemel v. Smith, 64 Nev. 545, 187 P.2d 169.
[3]  In the event accused has waived a preliminary hearing his counsel can request a preliminary hearing prior to trial. Even where there has been a preliminary hearing counsel should make a request for a new preliminary hearing if his client was prejudiced because of lack of counsel.
