
187 Cal.App.3d 648 (1986)
232 Cal. Rptr. 165
THE PEOPLE, Petitioner,
v.
THE SUPERIOR COURT OF BUTTE COUNTY, Respondent; CHICO FEMINIST WOMEN'S HEALTH CENTER et al., Real Parties in Interest.
Docket No. 26276.
Court of Appeals of California, Third District.
December 1, 1986.
*650 COUNSEL
John K. Van de Kamp, Attorney General, W. Scott Thorpe and David A. Rhodes, Deputy Attorneys General, for Petitioner.
No appearance for Respondent.
Mark E. Merin, Kanter, Williams, Merin & Dickstein and Paul T. Persons for Real Parties in Interest.
OPINION
PUGLIA, P.J.
The People petition for writ of mandate seeking review of an order of respondent superior court. The order upholds a magistrate's ruling that certain business records and documents seized pursuant to a search warrant from real party in interest Chico Feminist Women's Health Center (Center) must be returned to Center. We have stayed the magistrate's order directing return of the records and documents. We now conclude that the writ should issue, although not for the reasons urged by the People.
In 1983 the State Employment Development Department (EDD) commenced an investigation of alleged violations of the Unemployment Insurance *651 Code by real parties in interest, Center and certain of its employees (collectively referred to as Center). A justice court judge, sitting as a magistrate, issued a search warrant authorizing seizure of certain records and documents in the possession of Center. The warrant was executed in February 1984 by officers of the sheriff's department and EDD. Numerous records and documents were seized and turned over to the district attorney, but no action was taken to initiate a prosecution.
In July 1984, Center filed a motion seeking return of the property. A lengthy round of motions and hearings followed, which we need not detail here. After the records and documents had been in the possession of the district attorney for 13 months, the magistrate, in March 1985, ordered them returned to the custody of the court. More procedural manuevering ensued, and, in November 1985, the magistrate held the search and seizure illegal and directed the return of all records and documents to Center. In doing so, the magistrate ruled on only one of numerous Fourth Amendment and statutory issues raised by Center's motion to return.
The People filed notice of appeal in respondent superior court. After concluding that the magistrate's order was not reviewable by appeal, the People petitioned the superior court for a writ of mandate. The superior court stayed return of the records and documents to Center pending decision on the petition, and they remain in the custody of the magistrate to this day. After the issues were briefed and argued, the superior court denied the petition solely on procedural grounds. The superior court reasoned that the magistrate's order was not appealable; decisional authorities hold that when the Legislature has not vouchsafed to the People a right of appeal, this lacuna cannot be filled by resort to the extraordinary writ process; therefore the petition must be denied.
The superior court's order denying the writ, made March 7, 1986, was stayed, first for 45 days, then until May 22, to give the People an opportunity to seek review here. On May 20, the instant petition was filed, and on May 22 this court issued its own stay, barring return of the documents, pending further order.
The instant petition asserts that the superior court erred in holding the People are not entitled to writ review, and that the superior court should have ruled on the merits of the challenge to the magistrate's order to return the records and documents to Center. In addition the petition asks this court to hold that the magistrate erred in concluding the search was illegal.
Preliminarily, we note that the legality of the search is not ripe for review, since the superior court has not ruled on the issue. The only question before *652 us is whether the superior court erred in declining to consider the merits of the People's petition. (1) While we recognize that we have no authority to order the superior court to exercise its discretion in a particular way, when, as here, that court has erroneously refused to exercise its discretion at all, we may direct it to do so. (Burnett v. Superior Court (1974) 12 Cal.3d 865, 869-870 [117 Cal. Rptr. 556, 528 P.2d 372].) For the reasons that follow, we conclude that the superior court erred in denying the People writ review of the magistrate's order. Accordingly, we shall issue a writ of mandate directing the superior court to reinstate the People's petition and rule on the merits of the controversy.
(2) The superior court and the parties have treated the proceedings before the magistrate as a motion for the return of property pursuant to Penal Code section 1540. This is an accurate characterization of the proceeding. Section 1540 provides: "If it appears that the property taken is not the same as that described in the warrant, or that there is no probable cause for believing the existence of the grounds on which the warrant was issued, the magistrate must cause it to be restored to the person from whom it was taken."
A number of cases, in various contexts, have established that section 1540 is intended to give the owner of seized property an avenue for challenging the legality of a seizure pursuant to warrant. (See, e.g., People v. Butler (1966) 64 Cal.2d 842, 844-845 [52 Cal. Rptr. 4, 415 P.2d 819]; Aday v. Superior Court (1961) 55 Cal.2d 789 [13 Cal. Rptr. 415, 362 P.2d 47]; People v. Chochos (1973) 31 Cal. App.3d 445 [107 Cal. Rptr. 410]; People v. Gershenhorn (1964) 225 Cal. App.2d 122, 125 [37 Cal. Rptr. 176]; People v. Perez (1961) 189 Cal. App.2d 526, 531 [11 Cal. Rptr. 456]; People v. Bonanza Printing Co. (1969) 271 Cal. App.2d Supp. 871, 874 [76 Cal. Rptr. 379].) While section 1540 is not to be relied upon in cases where relief would be available pursuant to Penal Code section 1538.5, the latter section is not applicable in this case, since by its terms it is restricted to a motion by "a defendant" to return property or suppress "as evidence" tangible or intangible things obtained in a search or seizure. In search warrant cases not covered by section 1538.5, the proper procedure is to address a motion to return or suppress to the magistrate who issued the warrant. (See People v. Chochos, supra, 31 Cal. App.3d at pp. 458-459.) (3) (See fn. 1.) The second clause of section 1540 ("that there is no probable cause for believing the existence of the grounds on which the warrant was issued") provides the authority for Center's attack on the search warrant which eventually resulted in the magistrate's order.[1]


*653 Is the Magistrate's Order Directing Return of the Documents Appealable?

In the superior court and here, Center has maintained, without citation to authority, that the People's petition to the superior court should have been rejected because the magistrate's order was final, determined all the issues between the parties, and was therefore appealable. The superior court, relying primarily on People v. Gershenhorn, supra, 225 Cal. App.2d at pages 125-126, and Gershenhorn v. Superior Court (1964) 227 Cal. App.2d 361, 363-364 [38 Cal. Rptr. 576], rejected this contention. The Gershenhorn decisions and other cases involving motions to return or suppress property, brought before, during and after trial, have consistently held that there is no right to appeal from orders granting or denying such motions. (See, e.g., Flack v. Municipal Court (1967) 66 Cal.2d 981 [59 Cal. Rptr. 872, 429 P.2d 192]; Aday v. Superior Court, supra, 55 Cal.2d 789; Jett v. Municipal Court (1986) 177 Cal. App.3d 664, 667 [223 Cal. Rptr. 111]; Espinosa v. Superior Court (1975) 50 Cal. App.3d 347, 350 [123 Cal. Rptr. 448]; People v. Hopkins (1975) 44 Cal. App.3d 326, 328 [118 Cal. Rptr. 683]; People v. Superior Court (1972) 28 Cal. App.3d 600, 623 [104 Cal. Rptr. 876].) These cases all involve motions made in the trial court as distinguished from a section 1540 motion to a magistrate, but they all rely on the same reasoning: that the right to appeal is strictly statutory, and the Legislature, by omitting orders granting or denying motions to return property from those dispositions which are expressly appealable (see Pen. Code, §§ 1466, 1237, 1238), has implicitly precluded review. This analysis is most prominently explicated in People v. Gershenhorn, supra, 225 Cal. App.2d at pages 125-126, and a number of the later cases simply cite Gershenhorn for the proposition.
(4a) Apart from the Gershenhorn principle, there is a more cogent reason why the magistrate's order is not appealable to the superior court. The superior court's appellate jurisdiction is conferred by statute and extends only to orders or judgments of an inferior court, i.e., a justice or municipal court. Orders of a judge issued while sitting as a magistrate are not orders of an inferior court. (See People v. Peters (1978) 21 Cal.3d 749 [147 Cal. Rptr. 646, 581 P.2d 651]; People v. Hawkins (1978) 85 Cal. App.3d 960, 968 [149 Cal. Rptr. 855]; People v. Belknap (1974) 41 Cal. App.3d 1019 [116 Cal. Rptr. 664]; People v. Randall (1973) 35 Cal. App.3d 972 [111 Cal. Rptr. 590]; Wells v. Justice Court (1960) 181 Cal. App.2d 221 [5 Cal. Rptr. 204]; People v. Denton (1978) 84 Cal. App.3d Supp. 1 [5 Cal. Rptr. 204].) As the cited cases explain, a magistrate is a purely statutory officer whose powers and functions all judges of courts of record are authorized *654 to exercise and perform. (5) However, "`"When a judge of a particular judicial district acts in the capacity of a magistrate, he does not do so as a judge of a particular court but rather as one who derives his powers from the provisions of Penal Code, sections 807 and 808...."'" (People v. Hawkins, supra, at p. 966.) (4b) Penal Code section 1466, which establishes the appellate jurisdiction of the superior court, refers only to judgments or orders of an "inferior court." The term inferior court does not encompass a municipal or justice court judge sitting as a magistrate and the orders of such therefore cannot be appealed. (People v. Denton, supra, 84 Cal. App.3d Supp. at p. 4.) (6) Since the power to order property seized under a warrant restored to one who is not a defendant is confided to a magistrate (Pen. Code, § 1540), there is no appeal from such an order. (See People v. Halloway (1864) 26 Cal. 651, 654.) This is a limitation arising out of the nature of the office of magistrate.

Is the Order to Return Property Reviewable by Extraordinary Writ?
As explained, the superior court, after concluding that the People have no remedy by appeal, determined as a consequence that there can be no review by extraordinary writ proceedings. In so deciding, the court relied upon the line of cases holding that when the Legislature has not granted the People a right to appeal a lower court's ruling or order, the People may not circumvent the implied denial of review by seeking a writ. The most frequently cited exposition of this principle is found in People v. Superior Court (Howard) (1968) 69 Cal.2d 491, 497-500 [72 Cal. Rptr. 330, 446 P.2d 138].)
In Howard, the Supreme Court rebuffed an attempt by the People to obtain writ review of an order dismissing an information under Penal Code section 1385. The court noted that "The question is whether mandate should be available to secure a review when the Legislature has determined there should be no appeal. In such a case the petitioner has not an inadequate right of appeal, but no appeal at all. [¶] The Legislature has determined that except under certain limited circumstances the People shall have no right of appeal in criminal cases.... [¶] The restriction on the People's right to appeal is not merely a procedural limitation allocating appellate review between direct appeals and extraordinary writs but is a substantive limitation on review of trial court determinations in criminal trials." (Howard, supra, 69 Cal.2d at pp. 497-498.)
The Howard court reviewed several appellate court decisions which had permitted or denied writ review in various contexts, and recognized that there may be an exception to the general principle where the act of the lower court is in excess of jurisdiction and there is no "danger of further trial or retrial." (Id., at p. 501.) This "exception" has been recognized and *655 applied in a number of later appellate decisions, frequently with inconsistent or contradictory results. (See discussion in People v. Municipal Court (Kong) (1981) 122 Cal. App.3d 176, 180-183 [175 Cal. Rptr. 861].)
(7) The parties here focus their arguments largely on the issue of whether the magistrate's decision was in excess of jurisdiction, and therefore amenable to writ review under the exception recognized in Howard. However, in our view the overriding question is whether the principles enunciated in Howard are pertinent at all to the present dispute. We answer that question in the negative.
Howard is an application of the doctrine expressio unius est exclusio alterius. The analysis in that case is premised on the fact that Penal Code section 1238 (like § 1466) expressly specifies the orders, judgments, etc., from which the People may appeal. By plain implication, there is no right of appeal from those dispositions not mentioned. Howard completes the syllogism by holding the People cannot do indirectly, i.e., by writ, what they are not authorized by statute to do directly. The logic is indisputable insofar as it applies to orders of a trial court. However, where, as here, we are not concerned with an act by a "court," Howard is simply not pertinent.
Penal Code sections 1238 and 1466 provide for appeal from certain orders and judgments of trial courts, not magistrates. Since they don't purport to deal with magistrates' orders, their omission to deal with that subject carries with it no implication of nonreviewability. Thus, they cannot be read as implicitly denying the People a right of review of a magistrate's order in the same way as they imply a denial of that right in respect to trial court dispositions which are not expressly mentioned.
Nor do we believe that the legislative silence concerning appealability of magistrates' orders implies anything with respect to reviewability. A magistrate's orders are ancillary to an ongoing criminal prosecution. Because they are subsumed within a criminal prosecution, nonappealability is a given, and an express blanket prohibition of appealability would be superfluous. The point is that Howard deals with final dispositions of a "court" some of which are statutorily appealable and some of which are not. No magistrate's order is appealable in any event and therefore Howard is inapposite.
Since writ review of a magistrate's order does not contravene an implicit legislative policy foreclosing review, is writ review permitted? We conclude that it is. Code of Civil Procedure section 1085 provides mandate may be issued by a superior court to any "inferior tribunal." A magistrate, while not an inferior court, is an inferior tribunal.
*656 We are satisfied that the result we reach is in harmony with the manifest legislative policy to afford review of final decisions relating to searches and seizures. One of the underlying motivations for the 1967 enactment of Penal Code section 1538.5 was to provide the prosecution with a right to review of pretrial suppression or return orders in criminal proceedings. (See Moreno v. Superior Court (1978) 80 Cal. App.3d 932, 935 [146 Cal. Rptr. 35].) The Legislature perceived no fundamental unfairness or injustice in permitting the People to petition for a writ after an accusatory pleading had been filed, and we believe it incongruous to deny the People the same procedural right simply because the party subjected to search and seizure fortuitously files a motion challenging its legality prior to commencement of formal prosecution. Accordingly, we hold that the People's petition was properly before the superior court, and that court should have determined the merits of the issues raised.
(8) Finally we reject Center's argument that the time limits of Penal Code section 1538.5 should be applied here, and that the superior court properly denied the petition because it was not filed within 30 days after entry of the magistrate's order. As previously noted, section 1538.5 is not, by its own terms, applicable here. The People's petition was filed within the time permitted for appeals from a final judgment and was therefore timely. (See Popelka, Allard, McCowan & Jones v. Superior Court (1980) 107 Cal. App.3d 496, 499 [165 Cal. Rptr. 748].)
Having complied with the procedures required by Palma v. U.S. Industrial Fasteners, Inc. (1984) 36 Cal.3d 171 [203 Cal. Rptr. 626, 681 P.2d 893], we are authorized to issue a peremptory writ of mandate without first issuing an alternative writ. Let a peremptory writ of mandate issue directing respondent superior court to vacate its orders denying the People's petition for writ of mandate and dissolving its stay of the magistrate's order to return the seized property, and to reinstate and act on that petition in a manner consistent with this opinion. The stay of the magistrate's order previously issued by this court will remain in effect until the superior court acts to reinstate its own stay order, at which time our stay will terminate.
Blease, J., and Carr, J., concurred.
NOTES
[1]  The existence of discrete statutory remedies available to defendants and non-defendants is reflected in amendments to Penal Code section 1539 by the same legislation which added section 1538.5. (Stats. 1967, ch. 1537.) A procedural section, amended section 1539 distinguishes "a defendant" from "a person who is not a defendant in a criminal action at the time the hearing is held." Section 1539 recognizes the standing of both defendants and nondefendants to attack the grounds on which a search warrant was issued.
