
59 Cal.App.3d 929 (1976)
131 Cal. Rptr. 221
JERROLD CHIVERS et al., Petitioners,
v.
THE MUNICIPAL COURT FOR THE RICHMOND JUDICIAL DISTRICT OF CONTRA COSTA COUNTY, Respondent; THE PEOPLE, Real Party in Interest.
Docket No. 38234.
Court of Appeals of California, First District, Division Two.
July 6, 1976.
*930 COUNSEL
Patrick R. Murphy, Jeff Bradley, Patrick Meistrell, and Douglas E. Lord for Petitioners.
No appearance for Respondent.
Evelle J. Younger, Attorney General, Jack R. Winkler, Chief Assistant Attorney General, Edward P. O'Brien, Assistant Attorney General, Robert R. Granucci and J. Patrick Collins, Deputy Attorney General, for Real Party in Interest.
OPINION
TAYLOR, P.J.
This petition for extraordinary relief presents the question of the duty of a trial court to conduct a special hearing on motions to suppress evidence made pursuant to Penal Code section *931 1538.5, subdivision (g), after felony charges had been reduced to misdemeanors pursuant to Penal Code section 17, subdivision (b)(5), notwithstanding the fact that motions to suppress evidence made pursuant to Penal Code section 1538.5, subdivision (f), had already been made and ruled upon by the magistrate at the preliminary hearing.[1] The matter arose in the following manner.
Petitioners Chivers and Schreckengost were charged jointly with violating Health and Safety Code sections 11377 (possession of a controlled substance (methamphetamine)) and 11357 (possession of marijuana). In addition, Chivers was charged with a violation of section 12021 (possession of a concealable firearm by a convicted felon). Petitioners entered pleas of not guilty and a preliminary hearing was conducted on February 19, March 5, 19 and 21, 1975. During the preliminary hearing, petitioners made an oral motion pursuant to section 1538.5, subdivision (f), to suppress certain evidence which had been seized. On March 26, 1975, the motion to suppress was granted in part and denied in part. The magistrate then made an order, pursuant to section 17, subdivision (b)(5), that the felony drug charges be reduced to misdemeanors. On May 30, 1975, the felony charge of violation of section 12021 as to Chivers was dismissed.
On May 29, 1975, petitioners noticed motions to suppress the remaining evidence, pursuant to section 1538.5, subdivision (g). On June 11, 1975, respondent court refused to hear the motions on the ground that the motions had previously been ruled upon by the magistrate at the preliminary hearing.
On October 17, 1975, petitioners filed a petition for writ of mandate in the California Supreme Court (S.F. No. 23369), contending that the court had a duty to hear and determine their motions to suppress evidence at a special hearing.[2] The matter was transferred to the Court of Appeal (1 Civ. No. 37856, Div. One), which on November 3, 1975, denied the petition without prejudice to filing proceedings in superior court. The superior court subsequently issued an alternative writ of mandate, and on December 18, 1975, denied relief. On January 2, 1976, petitioners filed the within petition for writ of mandate in this court, *932 seeking relief identical to that sought in 1 Civil No. 37856. On March 8, 1976, upon receipt of opposition from the Attorney General, we summarily denied the writ. On April 7, 1976, the Supreme Court granted a petition for hearing, and the matter was transferred to this court with directions to issue an alternative writ of mandamus. We proceed, therefore, to reconsider the matter.
Section 1538.5 provides the procedural framework whereby criminal defendants may move to suppress unlawfully seized evidence. Section 1538.5, subdivision (f), provides that: "If the property or evidence relates to a felony offense initiated by a complaint, the motion may be made in the municipal or justice court at the preliminary hearing." (Italics added.)
In addition to the remedy afforded defendants at the preliminary hearing, the statute gives a defendant charged with a felony a second opportunity to move for suppression of evidence. Section 1538.5, subdivision (i), provides that: "If the property or evidence obtained relates to a felony offense ... the defendant shall have the right to renew or make the motion in the superior court at a special hearing relating to the validity of the search or seizure which shall be heard prior to trial and at least 10 days after notice to the people unless the people are willing to waive a portion of this time. The defendant shall have the right to litigate the validity of a search or seizure de novo on the basis of the evidence presented at a special hearing." (Italics added.)
In contrast, a defendant charged with a misdemeanor has only one initial opportunity to suppress allegedly tainted evidence. Section 1538.5, subdivision (g), provides that: "If the property or evidence relates to a misdemeanor complaint, the motion shall be made in the municipal or justice court before trial and heard prior to trial at a special hearing relating to the validity of the search or seizure." (Italics added.)
Thus far, and in most circumstances, the subdivisions of section 1538.5 are clear and harmonious. The apparent dissonance, as the facts of this case show, stems from an application of section 17, subdivision (b)(5), which reads: "When a crime is punishable, in the discretion of the court, by imprisonment in the state prison or by fine or imprisonment in the county jail, it is a misdemeanor for all purposes under the following circumstances:
"When, at or before the preliminary examination ... the magistrate determines that the offense is a misdemeanor, in which event the case *933 shall proceed as if the defendant had been arraigned on a misdemeanor complaint." (Italics added.)
Petitioners contend that when a magistrate has reduced felony charges and allowed the case to proceed as a misdemeanor prosecution, a defendant has the right to a special hearing on a motion to suppress, pursuant to the provisions of section 1538.5, subdivision (g), even though a motion to suppress, pursuant to the provisions of section 1538.5, subdivision (f), has been made and ruled upon at the preliminary hearing. (1) Although we agree with the People that successive applications based on the same factual showing should be discouraged (People v. Krivda (1971) 5 Cal.3d 357, 363 [96 Cal. Rptr. 62, 486 P.2d 1262], disapproved on another point in Madril v. Superior Court (1975) 15 Cal.3d 73, 76-77 [123 Cal. Rptr. 465, 539 P.2d 33]), upon reexamination of the matter, we are compelled to agree with petitioners that a motion made pursuant to section 1538.5, subdivision (f), is not the equivalent of a special hearing under section 1538.5, subdivision (g), and that the municipal court was required, pursuant to the provisions of section 1538.5, subdivision (c), to hear and determine petitioners' motion to suppress evidence at a special hearing in the municipal court, as provided in section 1538.5, subdivision (g).[3]
It is clear that when the felony offenses were reduced to misdemeanors, pursuant to section 17, subdivision (b)(5), they became misdemeanors for all purposes (People v. Pruett (1975) 51 Cal. App.3d 329, 331 [124 Cal. Rptr. 273]; People v. Ryser (1974) 40 Cal. App.3d 1, 9 [114 Cal. Rptr. 668]), and subject not only to the provisions of section 1538.5, subdivision (g) relating to a special hearing on a motion to suppress, but also to other special provisions relating to misdemeanor cases, i.e., continuance in order to prepare for a special hearing (§ 1538.5, subd. (l)), appeal to the superior court from the denial of the motion (§ 1538.5, subd. (j)), and bail or release on own recognizance in the event of an appeal from the denial of such a motion (§ 1538.5, subd. (l)).[4] The rights and remedies afforded *934 by all of these provisions would be denied petitioners by reason of the court's refusal to hear and determine their motion to suppress made pursuant to section 1538.5, subdivision (g).
(2) The law is well settled that a trial court is under a duty to hear and determine the merits of all matters properly before it which are within its jurisdiction and that mandate may be used to compel the performance of this duty (Burnett v. Superior Court (1974) 12 Cal.3d 865, 869-870 [117 Cal. Rptr. 556, 528 P.2d 372]; Robinson v. Superior Court (1950) 35 Cal.2d 379, 383 [218 P.2d 10]). Petitioners' motions, made pursuant to section 1538.5, subdivision (g), were properly before the municipal court, and the judge was required by the provisions of section 1538.5, subdivision (c), to hear and determine the merits of the motions.
Let a peremptory writ of mandate issue as prayed for in the petition.
Kane, J., and Rouse, J., concurred.
The petition of the real party in interest for a hearing by the Supreme Court was denied September 3, 1976.
NOTES
[1]  Hereafter all references are to the Penal Code, unless otherwise indicated.
[2]  The record contains no explanation for the delay of over four months between the date respondent court refused to hear the motions and the filing of the first petition for mandate.
[3]  Section 1538.5, subdivision (c), provides: "Whenever a search or seizure motion is made in the municipal, justice or superior court as provided in this section, the judge or magistrate shall receive evidence on any issue of fact necessary to determine the motion." (Italics added.)
[4]  Section 1538.5, subdivision (j) provides, in pertinent part, as follows: "If the property or evidence seized relates solely to a misdemeanor complaint, and the defendant made a motion for the return of property or the suppression of evidence in the municipal court or justice court prior to trial, both the people and defendant shall have the right to appeal any decision of that court relating to that motion to the superior court of the county in which such inferior court is located, in accordance with the California Rules of Court provisions governing appeals from municipal and justice courts in criminal cases." (Italics added.)

Section 1538.5, subdivision (l) provides, in pertinent part, as follows: "In a misdemeanor case, the defendant shall be entitled to a continuance of up to 30 days if he intends to file a motion to return property or suppress evidence and needs this time to prepare for the special hearing on the motion. In case of an appeal by the defendant in a misdemeanor case from the denial of such motion, he shall be entitled to bail as a matter of right, and, in the discretion of the trial or appellate court, may be released on his own recognizance pursuant to Section 1318.4." (Italics added.)
