
318 S.E.2d 437 (1984)
Tony DESPER
v.
STATE of West Virginia, The Honorable Burl Holbrook, Magistrate, and the Magistrate Court of Kanawha County, West Virginia.
No. 16120.
Supreme Court of Appeals of West Virginia.
June 13, 1984.
*439 Pepper & Nason, Charleston, for appellant.
Silas B. Taylor, Asst. Atty. Gen., Charleston, for appellees.
*438 McHUGH, Chief Justice:
This proceeding in mandamus is before this Court upon the petition of Tony A. Desper. Desper seeks to compel the respondents to grant him a new preliminary examination in a case in which Desper (hereinafter "defendant") is charged, under W.Va.Code, 61-2-12 [1961], with the felony offense of robbery. Respondent Holbrook conducted the defendant's original preliminary examination.[1] This Court directed the respondents to show cause why relief in mandamus should not be awarded against them. This Court has before it the petition, all matters of record and the briefs and argument of counsel.
In the early morning hours of October 13, 1983, a robbery occurred at a Go-Mart Store in Charleston, Kanawha County, West Virginia. James R. Young, an employee at that store testified at the defendant's preliminary examination that a man, holding Young at knife-point, took approximately $87 from the store's cash register. Other people were in the store at that time. Immediately after the robbery, the assailant left the premises.
At the preliminary examination, the State called only one witness, Young. He described the robbery and, during the hearing, identified the defendant as the assailant. Young testified that he had previously identified the defendant as the assailant from police photographs. Young further testified that he had made a written statement to the police concerning the robbery.[2]
The record indicates that two police officers were present at the defendant's preliminary examination, one of whom was known as "Detective Lee." Defense counsel attempted to call those officers as witnesses, purportedly for the purpose of eliciting testimony concerning (1) an alleged inconsistency between the arrest warrant and the testimony of Young,[3] (2) the identification by Young of the defendant from police photographs and (3) the written statement made by Young to the police concerning the robbery.[4] However, asserting *440 that defense counsel simply intended to engage in the discovery of the State's case against the defendant, the State objected to the calling of the police officers as witnesses. The magistrate sustained that objection and refused to permit defense counsel to call the police officers as witnesses.[5]
Finding probable cause, the magistrate held the defendant to answer in the Circuit Court of Kanawha County upon the charge of robbery. The circuit court refused the defendant's request for a new preliminary examination. Subsequently, the defendant was indicted for robbery by a Kanawha County grand jury.

I
Rule 5.1 of the West Virginia Rules of Criminal Procedure addresses the manner in which preliminary examinations or hearings shall be conducted in this State.[6] Sections (a) and (b) of that rule provide as follows:
(a) Probable Cause Finding. If from the evidence it appears that there is probable cause to believe that an offense has been committed and that the defendant committed it, the magistrate shall forthwith hold him to answer in circuit court. Witnesses shall be examined and evidence introduced for the state under the rules of evidence prevailing in criminal trials generally except that hearsay evidence may be received, if there is a substantial basis for believing:
(1) That the source of the hearsay is credible;
(2) That there is a factual basis for the information furnished; and
(3) That it would impose an unreasonable burden on one of the parties or on a witness to require that the primary source of the evidence be produced at the hearing.
The defendant may cross-examine witnesses against him and may introduce evidence in his own behalf. Objections to evidence on the ground that it was acquired by unlawful means are not properly made at the preliminary examination. Motions to suppress must be made to the trial court as provided in Rule 12. On motion of either the state or the defendant, witnesses shall be separated and not permitted in the hearing room except when called to testify.
(b) Discharge of Defendant. If from the evidence it appears that there is no probable cause to believe that an offense has been committed or that the defendant committed it, the magistrate shall dismiss the complaint and discharge the defendant. The discharge of the defendant shall not preclude the state from instituting a subsequent prosecution for the same offense.
In West Virginia, a preliminary examination is not constitutionally required. Syl. pt. 1, State ex rel. Rowe v. Ferguson, ___ W.Va. ___, 268 S.E.2d 45 (1980); syl. pt. 1, Gibson v. McKenzie, 163 W.Va. 615, 259 S.E.2d 616 (1979). See also Stover v. Coiner, 290 F.Supp. 852, 855 (N.D.W.Va.1968); Guthrie v. Boles, 261 F.Supp. 852, 854 (N.D.W.Va.1967). However, when a preliminary examination is held, it is regarded as a "critical stage" at which a defendant has a constitutional right to counsel. State v. Stout, ___ W.Va. ___, 285 S.E.2d 892, 893 (1982). In Coleman v. Alabama, 399 U.S. 1, 90 S.Ct. 1999, 26 L.Ed.2d 387 (1970), Justice Brennan, writing for the majority, set forth four reasons for a criminal defendant's entitlement to counsel at a preliminary examination. As those four reasons indicate, a *441 criminal defendant may benefit in various ways from the holding of a preliminary examination:
Plainly the guiding hand of counsel at the preliminary hearing is essential to protect the indigent accused against an erroneous or improper prosecution. First, the lawyer's skilled examination and cross-examination of witnesses may expose fatal weaknesses in the State's case that may lead the magistrate to refuse to bind the accused over. Second, in any event, the skilled interrogation of witnesses by an experienced lawyer can fashion a vital impeachment tool for use in cross-examination of the State's witnesses at the trial, or preserve testimony favorable to the accused of a witness who does not appear at the trial. Third, trained counsel can more effectively discover the case the State has against his client and make possible the preparation of a proper defense to meet that case at the trial. Fourth, counsel can also be influential at the preliminary hearing in making effective arguments for the accused on such matters as the necessity for an early psychiatric examination or bail.
399 U.S. at 9, 90 S.Ct. at 2003, 26 L.Ed.2d at 397.
Nevertheless, a preliminary hearing serves primarily to determine the question of probable cause. In Barber v. Page, 390 U.S. 719, 88 S.Ct. 1318, 20 L.Ed.2d 255 (1968), the petitioner was charged in an Oklahoma state court with robbery, and the principal evidence admitted against him at trial consisted of the reading of a transcript of the testimony of a witness who testified at the defendant's preliminary hearing. The Supreme Court of the United States, in Barber, held that the defendant's constitutional right to be confronted with the witnesses against him had been violated, because the state had failed to make a good faith effort to secure the presence of that witness at the defendant's trial. In so holding, the Supreme Court noted as follows: "A preliminary hearing is ordinarily a much less searching exploration into the merits of a case than a trial, simply because its function is the more limited one of determining whether probable cause exists to hold the accused for trial." 390 U.S. at 725, 88 S.Ct. at 1322, 20 L.Ed.2d at 260.
The above language of Barber is consistent with our recognition in State ex rel. Rowe v. Ferguson, supra, that the function of a preliminary examination has been traditionally to enable the accused to challenge probable cause. 268 S.E.2d at 50. Furthermore, it is evident from the language of W.Va.R.Crim.P. 5.1 and W.Va.Code, 62-1-8 [1965], that a preliminary examination serves to determine whether there is probable cause to believe that an offense has been committed and that the defendant committed it.
The following cases indicate that discovery is not the primary object of a preliminary examination: United States v. Mulligan, 520 F.2d 1327, 1330 (6th Cir.1975), cert. denied, 424 U.S. 919 (1976), although a preliminary hearing may be a practical tool for discovery by the accused, "the only legal justification for its existence is to protect innocent persons from languishing in jail on totally baseless accusations"; Robbins v. United States, 476 F.2d 26, 32 (10th Cir.1973), "a preliminary hearing is not designed for the purpose of affording discovery for an accused"; United States v. Foster, 440 F.2d 390, 392 (7th Cir.1971), the purpose of a preliminary hearing relates to the determination of probable cause, rather than to discovery for the defendant; Sciortino v. Zampano, 385 F.2d 132, 134 (2nd Cir.1967), cert. denied, 390 U.S. 906, 88 S.Ct. 820, 19 L.Ed.2d 872 (1968), "[w]e cannot agree to elevating into a right to be enjoyed by an accused the pure fortuity that where a preliminary hearing is held there is necessarily some discovery of the government's evidence"; United States v. Chase, 372 F.2d 453, 467 (4th Cir.), cert. denied, 387 U.S. 907, 87 S.Ct. 1688, 18 L.Ed.2d 626 (1967), "a preliminary hearing, although it may serve as a vehicle of pretrial discovery for an accused, has as its principal purpose a determination of whether probable cause exists to bind an accused for action by a grand jury"; United *442 States v. Permisohn, 339 F.Supp. 52, 56 (S.D.N.Y.1971), "the purpose of a preliminary hearing ... is not to provide a defendant with a preview of the Government's case against him...."; United States v. Lewis, 266 F.Supp. 897, 899 (S.D.N.Y.1967), "the function of a preliminary hearing is not one of discovery, but one of determining probable cause to hold the defendant." See also McDonald v. The District Court in and for the Fourth Judicial District, 195 Colo. 159, 161, 576 P.2d 169, 171 (1978); Rex v. Sullivan, 194 Colo. 568, 571, 575 P.2d 408, 410 (1978); State v. Arnold, 421 A.2d 932, 935 (Me.1980); State v. Hudson, 295 N.C. 427, 430, 245 S.E.2d 686, 689 (1978); State v. Serl, 269 N.W.2d 785, 791 (S.D.1978); Weddle v. State, 621 P.2d 231, 239 (Wyo.1980); State v. Prevost, 118 Ariz. 100, 103, 574 P.2d 1319, 1322 (1977); People v. Staton, 94 Misc.2d 1002, 406 N.Y.S.2d 242, 244 (1978).
The Court of Appeals of Arizona in State v. Prevost, supra, stated as follows: "The purpose of a preliminary hearing is not to give defendants an opportunity for discovery but to determine probable cause to hold defendant to answer. Any discovery resulting from a preliminary hearing is incidental and not a right of defendant." 118 Ariz. at 103, 574 P.2d at 1322.
Consequently, a preliminary examination conducted pursuant to Rule 5.1 of the West Virginia Rules of Criminal Procedure serves to determine whether there is probable cause to believe that an offense has been committed and that the defendant committed it; the purpose of such an examination is not to provide the defendant with discovery of the nature of the State's case against the defendant, although discovery may be a by-product of the preliminary examination.[7]
It should be noted that beyond any "discovery" of the State's case a criminal defendant may make at the preliminary examination, such a defendant has other, and more formal, discovery-type opportunities under the West Virginia Rules of Criminal Procedure. Some of those rules include the following: Rule 6, providing for disclosure of matters occurring before a grand jury; Rule 7, permitting a motion for a bill of particulars; Rule 12, providing for notice to the defense of the State's intention to use certain evidence; Rule 12.1, providing for notice to the defense of State witnesses establishing the defendant's presence at the scene of the alleged offense, and Rule 16, the principal discovery rule, permitting, inter alia, the defense to discover various aspects of the State's case. Rule 16, for example, provides, in part, as follows:
Upon request of the defendant, the state shall furnish to the defendant a written list of names and addresses of all state witnesses whom the attorney for the state intends to call in the presentation of the case in chief, together with any record of prior convictions of any such witnesses which is within the knowledge of the state.

II
We now address the question of whether the defendant in this case was entitled to elicit testimony from the two police officers who were present at the defendant's October 28, 1983, preliminary examination. In so doing we are, of course, guided by the principle expressed above that a preliminary examination "serves to determine whether there is probable cause to believe that an offense has been committed and that the defendant committed it." Furthermore, we limit our discussion to the right of the defendant to elicit testimony from Detective Lee, inasmuch as the record is *443 speculative with respect to the other, unidentified officer.
Citing Coleman v. Alabama, the United States Court of Appeals, District of Columbia Circuit, discussed in Coleman v. Burnett, 477 F.2d 1187 (D.C.Cir.1973), "the examinatorial entitlements of the criminally accused at federal preliminary hearings."[8] In that action, involving several defendants, defendant Shepard was charged with assaulting a federal officer. That officer and another person testified against Shepard at a preliminary hearing. Although Shepard's counsel was permitted considerable latitude in the cross-examination of those witnesses as to matters they testified to upon direct examination, the judge at the hearing refused to permit defense counsel to examine those witnesses concerning, inter alia, the nature of the injuries sustained by the officer and the nature of the injuries allegedly sustained by Shepard. The Court of Appeals in Coleman v. Burnett affirmed that ruling and stated as follows:
The mission of the hearing is an investigation into probable cause for further proceedings against the accused. It does not include discovery for the sake of discovery. To be sure, the evidence the Government offers to establish probable cause is by nature also discovery for the accused. So also is information adduced on cross-examination of Government witnesses on the aspects of direct-examination testimony tending to build up probable cause. In those senses, some discovery becomes a by-product of the process of demonstrating probable cause. But in no sense is discovery a legitimate end unto itself.
....
Cross-examination at a preliminary hearing, like the hearing itself, is confined by the principle that a probe into probable cause is the end and aim of the proceeding, and the line between refutation of probable cause and discovery into the prosecution's case ofttimes is thin.
477 F.2d at 1199-1200, 1201.[9]
The court in Coleman v. Burnett further considered the case of Jorge D. Dancis who was charged with a violation of federal law relating to marihuana. The government relied solely upon hearsay at the Dancis preliminary hearing, and the magistrate denied the request of Dancis for a subpoena which would have required the attendance at that hearing of an unnamed undercover agent. That agent was the sole available eyewitness to the alleged marihuana violation. Noting the importance of the undercover agent's testimony upon the question of probable cause, the court in Coleman v. Burnett held that the denial of the subpoena rendered the Dancis preliminary hearing defective. The court stated as follows:
So, an accused is normally entitled to subpoenas compelling the attendance at his preliminary hearing of witnesses whose testimony promises appreciable assistance on the issue of probable cause. The test, our past utterances on the subject have indicated, couples the witness' materiality with an absence of good cause for not requiring his presence, and its operation does not depend upon which side might have been expected to call the witness. Certainly an accused will not in every instance qualify for a subpoena for the production of a Government witness at his preliminary hearing, but where he *444 succeeds in a plausible showing that that witness could contribute significantly to the accuracy of the probable cause determination, the request for the subpoena should be granted.[10]
477 F.2d at 1205.
The court in Coleman v. Burnett held that Dancis was entitled to relief because of the defective preliminary hearing, even though he had been indicted subsequent to that hearing. The Court of Appeals did not reach the question of whether Dancis was entitled to a "supplemental preliminary hearing." Rather, the nature of the relief was left to the discretion of the trial court. The court in Coleman v. Burnett suggested that the trial judge consider, for example, making the undercover agent's grand jury testimony available to defense counsel. 477 F.2d at 1212.
In McDonald v. The District Court in and for the Fourth Judicial District, supra, the defendant was charged with attempted first-degree kidnapping and "felony menacing." Relying upon hearsay testimony, the government rested its case at the defendant's preliminary hearing after calling two police officers. The victim of the alleged crimes was present at that hearing, but the lower court refused to allow the defendant to call the victim as a witness. Noting that a preliminary hearing should not be conducted in a "perfunctory fashion," the Supreme Court of Colorado, in McDonald, held that the defendant should have been permitted to call the victim as a witness at the preliminary hearing. The court stated as follows:
The defense attorney stated two purposes for which he desired to have the witness [victim] McKenney testify: (1) to establish conditions surrounding the apartment complex; and (2) to test her identification of the defendant. The first purpose was clearly irrelevant to probable cause and appeared to be an attempt to gain discovery. In contrast, the second purposeidentification of petitioner as the man who committed the crimewas directed to a crucial element of probable cause that the defense certainly could inquire into.
195 Colo. at 162, 576 P.2d at 171.
In another Colorado case, Rex v. Sullivan, supra, the defendant was charged with attempted second-degree murder, second-degree kidnapping and sexual assault. The victim was a child. The investigating officer was the sole witness called by the government at the defendant's preliminary hearing. However, at that hearing, the defendant was permitted "to call other prosecution witnesses, including a physician and a forensic specialist." 194 Colo. at 572, 575 P.2d at 411. In Rex, the Supreme Court of Colorado held that the lower court properly exercised its discretion in quashing the defendant's subpoena which sought the presence of the victim at the preliminary hearing. In that case, the Supreme Court of Colorado rejected the defendant's assertion that the quashing of the subpoena violated the defendant's right to call witnesses and to introduce evidence in his own behalf at a preliminary hearing. Noting that the purpose of a preliminary hearing is to "screen out cases in which prosecution is unwarranted," that court stated as follows: "The right to cross-examine and to introduce evidence may be curtailed by the presiding judge consistent with the screening purpose of the preliminary hearing." 194 Colo. at 571, 575 P.2d at 410. In Rex, the Colorado court concluded that the defendant's inquiry into "matters relevant to the determination of probable cause" had not been improperly curtailed.
*445 As the above cases suggest, a preliminary examination is not a trial upon the issue of a criminal defendant's guilt. Rather, it is concerned with probable cause, and in the context of probable cause, a defendant may, under Rule 5.1, "cross-examine witnesses against him and may introduce evidence in his own behalf." Preliminary examinations are thus not conducted "to provide a defendant with a preview of the Government's case...." United States v. Permisohn, supra.
We therefore hold that in challenging probable cause at a preliminary examination conducted pursuant to Rule 5.1 of the West Virginia Rules of Criminal Procedure, a defendant has a right to cross-examine witnesses for the State and to introduce evidence; the defendant is not entitled during the preliminary examination to explore testimony solely for discovery purposes. The magistrate at the preliminary examination has discretion to limit such testimony to the probable cause issue, and the magistrate may properly require the defendant to explain the relevance to probable cause of the testimony the defendant seeks to elicit.
As indicated above, defense counsel attempted to call the police officers as witnesses, purportedly for the purpose of eliciting testimony concerning (1) an alleged inconsistency between the arrest warrant and the testimony of Young, the Go-Mart employee, (2) the identification by Young of the defendant from police photographs and (3) the written statement made by Young to the police concerning the robbery. According to the testimony of Young at the preliminary examination, Detective Lee was involved in each of those matters. Lee was present at the preliminary examination. We are of the opinion that the magistrate, under the circumstances of this case, should have permitted defense counsel to call Detective Lee as a witness at the preliminary examination, as a part of the defendant's attempt to challenge probable cause. If that testimony had been perceived by the State to have been irrelevant to the probable cause issue, the State could have sought to curtail that testimony. The magistrate could then have exercised his discretion to insure that the scope of Lee's testimony remained within permissible bounds.
In so holding, we recognize that, at a preliminary examination, testimony relating to probable cause is often difficult, if not impossible, to distinguish from testimony elicited for discovery purposes. Witnesses should not be called at a preliminary examination solely for discovery purposes. Furthermore, the "examinatorial entitlements" of a criminal defendant at a preliminary examination, in challenging probable cause, do not necessarily justify the defendant in seeking to require an unlimited number of witnesses to testify. The discretion of the magistrate in this area is crucial. A preliminary examination should not fall victim to an endless wrangle relating to the existence of probable cause.
We now reach the question of the relief to which the defendant is entitled resulting from the failure of the magistrate to allow the defendant to call Detective Lee as a witness.
The defendant was indicted in this case subsequent to the preliminary examination. Nevertheless, under the law of this State, that preliminary examination constituted a "critical stage" in the prosecution. State v. Stout, supra. The defendant's inability to question Detective Lee at the preliminary examination could result in prejudice to the defendant at trial. For example, in the course of determining probable cause at the defendant's preliminary examination, defense counsel, in questioning Detective Lee, could have preserved that testimony for possible impeachment of the State's case at trial. See Coleman v. Alabama. The preservation of such testimony in that context was distinguished in Coleman v. Alabama from attempts by defense counsel to simply discover the State's case.
As stated above, the court in Coleman v. Burnett, supra, held relief to be in order because of a defective preliminary examination, even though an indictment *446 had been returned subsequent to the preliminary examination. As in that case, we conclude that it is more appropriate to leave the nature of the relief to the discretion of the circuit court. In Coleman v. Burnett, for example, the court suggested that the trial court "might set appropriate bounds for an interview ..." of the undercover agent by Dancis' counsel. 477 F.2d at 1212.
Upon all of the above, this case is remanded to the Circuit Court of Kanawha County for proceedings consistent with this opinion.
Writ granted as moulded.
NOTES
[1]  The parties have improperly designated the magistrate in this case as "Earl Holbrook" rather than Burl Holbrook.
[2]  The complaint signed by Young asserting that the defendant robbed the Go-Mart store stated, in part, as follows: "The complainant [Young] came to the Charleston Police Department and gave a statement detailing the crime. The complainant also positively identified the accused from a photo lineup as being the subject who robbed him."
[3]  At the defendant's preliminary examination, defense counsel noted that Young testified that the money allegedly taken by the defendant during the robbery was the property of the Go-Mart store. Defense counsel asserted that Young's testimony concerning the money was therefore inconsistent with the language of the arrest warrant, which warrant indicated that the money taken during the robbery was the property of Young.
[4]  It should be noted that at the defendant's preliminary examination, the magistrate denied the request of defense counsel that the magistrate conduct an in camera inspection of Young's written statement to the police. Defense counsel indicated that he wanted the magistrate to determine whether that statement contained exculpatory matters of use to the defendant. The record is unclear, however, as to whether Young's statement was, in fact, available to the magistrate for inspection at the preliminary examination, and we do not reach that issue in this opinion.
[5]  The defense called one witness, George T. Triggs, Jr., at the preliminary examination. Triggs, a night manager for the Charleston Housing Authority, indicated that the defendant was seen at a housing project on the day of the robbery of the Go-Mart store.
[6]  See also W.Va.Code, 62-1-8 [1965].
[7]  We stated in State ex rel. Rowe v. Ferguson, supra, as follows:

A more modern function of the preliminary hearing is to enable the defendant to obtain discovery of the state's case during the presentation of its evidence relating to probable cause. We have accorded a liberal right of discovery to a criminal defendant once he has been indicted and, as a consequence, the discovery aspect of a preliminary hearing is of diminished importance.
268 S.E.2d at 50. See also State v. Stout, supra, 285 S.E.2d, at 894.
[8]  Rule 5.1 of the West Virginia Rules of Criminal Procedure is similar to the federal rule before the Court of Appeals in Coleman v. Burnett.
[9]  The court in Coleman v. Burnett, referring to the Shepard action, stated as follows:

Here counsel's purpose in propounding the questions which the presiding judge excluded was unquestionably blurred by the fact that counsel frequently appeared to be off on an impermissible quest for discovery. At no time prior to the rulings complained of did counsel delineate for the judge's edification the factual thesis he was seeking to promote.
....
Our reading of the hearing record leaves us with the conviction that the presiding judge, when ruling on counsel's questions, could hardly divine what counsel had in mind. Therefore, we cannot say that he committed error in barring responses to inquiries that seemed unrelated to the task of evaluating probable cause.
477 F.2d at 1201.
[10]  In Coleman v. Burnett, the court stated that "a federal preliminary hearing is not only the occasion upon which the Government must justify continued detention by a showing of probable cause, but also an opportunity for the accused to rebut that showing." 477 F.2d at 1204.

Furthermore, quoting from the opinion in Coleman v. Alabama, supra, the court in Coleman v. Burnett noted as follows: "Among [defense] counsel's potential contributions, the Court [in Coleman v. Alabama] stated, is `skilled examination ... of witnesses [which] may expose fatal weaknesses in the [prosecution's] case that may lead the magistrate to refuse to bind the accused over.'" 477 F.2d at 1204.
