OPINION OF THE COURT
Appellee, Horace Hetherington, a Title Inspector for the Commonwealth of Pennsylvania, was arrested on chargеs of blackmail, 1 extortion, 2 receiving a bribe, 3 malfeasance, 4 misfeasance, 5 and nonfeasance of office. 6 These charges stemmed from accusations made by a Philadelphia motor vehicle dealer that aрpellee had offered to “handle” certain irregularities on titles to vehicles owned by the dealer.
Following a preliminаry hearing the magistrate held appellee for action by the grand jury on charges of receiving a bribe, malfeasancе, misfeasance, and nonfea *21 sanee in office. The charges of blackmail and extortion were dismissed.
Appelleе then filed a “Motion to Quash” as to the four charges upon which he was held. This motion was presented to a judge of the Court of Common Pleas, who, after a hearing, granted the motion. The Commonwealth then moved to rearrest appellee on all charges by way of a petition filed and heard by another judge of the same court.
The latter judge, believing that the doctrine of rеs judicata and the orderly administration of justice precluded one judge of the Court of Common Pleas from reversing the order of another, denied the petition without a hearing. The Superior Court affirmed and this Court granted allocatur.
The position of the Commonwealth may best be analyzed by considering first their claimed denial of a right to rearrest as to those charges initially dischargеd by the committing magistrate and then a consideration of their claim that the second common pleas judge should have reviеwed the action of another judge of the same court who had determined a committing magistrate to be in error in making a finding of a prima facie case.
In
Commonwealth ex rel. Maisenhelder v. Rundle,
“The primary reason fоr preliminary hearing is to protect an individual’s right against unlawful arrest and detention. It seeks to prevent a person from being imprisоned or required to enter bail for a crime which was never committed, or for a crime with which there is no evidence of his connection. It is not a trial in any sense of the word. It does not purport or attempt to determine the guilt or innocence of the ac *22 cused, nor is he required to speak, plead or offer testimony in defense.” (Citations omitted).
A finding by a committing magistrate that the Commonwealth has failed to establish a prima facie case is not a final determination, such as an acquittal, and only еntitles the accused to his liberty for the present, leaving him subject to rearrest. In
McNair’s Petition,
“When the magistrate believes that probable сause to hold the defendant has not been proven, he may discharge him; . . . . If the commonwealth deems itself aggrieved by his decisiоn it may bring the matter again before any other officer empowered to hold preliminary hearings.” (Citations omitted).
In
Riggins Case,
We have long recognizеd the principle that a ruling of a court below will not be overturned where there is a legitimate basis for its support even though аn incorrect reason has been assigned.
International Union of Operating Engineers, Local 66, AFL-CIO v. Linesville Construction Co. et al.,
The confusion surrounding the secоnd issue is in large measure due to a misunderstanding as to the nature of the proceeding involved. The appellee incorrectly styled his application as a “Motion to Quash” the transcript of the committing magistrate which he asserts to be in the nature оf a demurrer. A demurrer however is a trial motion which is properly entertained only after the Commonwealth has presented its case in chief. 1937, June 5, P.L. 1703, No. 357, § 1; 19 P.S. § 481. The established and accepted method for testing a finding of a prima facie case pre-triаl, within this jurisdiction, has been by a writ of habeas corpus. 1937, July 1, P.L. 2664, §2; 12 P.S. § 1893.
Nor can we accept the Commonwealth’s position that the proceeding before the second common pleas judge should be considered as a petition for rearrest. This ignores the fact that the committing magistrate originally held these charges for action by the grand
*24
jury. When the matter was reviewed by the first common рleas judge it was in the nature of a petition for a writ of habeas corpus which is a proper subject for appellate review. Act of May 25, 1951, P.L. 415, § 7 as amended, Act of June 3, 1971, P.L. 143, No. 6, § 1, 12 P. S. § 1907 (Supp.1974-75). See also
Commonwealth ex rel. Tiller v. Dye,
For the reasons stаted herein we affirm the order of the court below.
