
143 Cal.App.3d 926 (1983)
192 Cal. Rptr. 436
THE PEOPLE, Plaintiff and Appellant,
v.
SHARI LYNN WEAVER, Defendant and Respondent.
Docket No. 42748.
Court of Appeals of California, Second District, Division Two.
June 15, 1983.
*928 COUNSEL
John K. Van de Kamp and Robert H. Philibosian, District Attorneys, Donald J. Kaplan and Dirk L. Hudson, Deputy District Attorneys, for Plaintiff and Appellant.
Edward P. George, Jr., and George S. Zugsmith for Defendant and Respondent.

OPINION
BEACH, J. 

NATURE OF APPEAL:
The People appeal an order setting aside one count of a two-count information alleging possession of phencyclidine (hereinafter PCP) and driving while under the influence of alcohol and drugs. They contend that the court erred in setting aside the count alleging possession of PCP as probable cause was established to justify its warrantless seizure. We agree and reverse the order.

FACTS  FROM PRELIMINARY HEARING:
Two Sheriff's deputies on duty at night observed a Honda automobile creeping along at approximately five miles per hour, weaving between two lanes, its engine racing. As they watched, the vehicle paused for a traffic light, then resumed its weaving course of travel, again at five miles per hour. Respondent, *929 the driver, and her male passenger were staring straight ahead and failed to respond to the deputies when they pulled abreast of them to inquire as to the manner of driving.
Thereafter, the deputies pulled to the rear of respondent's automobile, activated their warning and spotlights, then sounded the horn in an effort to gain her attention. Receiving no response, they again pulled abreast of the weaving vehicle and orally commanded the apparently stuporous occupants to stop. When these efforts proved unavailing, the deputies maneuvered to the rear and activated their siren, ultimately causing respondent to pull to the curb. This "pursuit" covered approximately three-fourths of a mile and the deputies intended to cite respondent for an infraction, as well as verify her sobriety.
One deputy approached and, upon receiving an incoherent response to a request for identification, asked that she exit the vehicle. Respondent fell to the pavement, stabilizing herself with her hand, as she complied. Simultaneously, that deputy detected the characteristic, malodorous scent of PCP emanating from respondent or the vehicle. The same deputy possessed extensive training and experience regarding PCP. After the passenger exited, the deputy continued to detect the odor and an inspection of the interior revealed that it emanated from a rear package tray.[1] Upon learning from the other deputy that respondent might be employed by the sheriff's department, the deputy who had smelled the PCP opened the hatchback to assure himself that no firearms were present, as well as to locate the source of the PCP odor. He immediately observed a sheriff's department jacket and detected a much stronger odor of PCP. Upon lifting the jacket, he observed a small, brown bottle with a loosened cap, leaking liquid PCP onto a stack of uniforms. Subsequent analysis disclosed the bottle contained approximately four milliliters of PCP.
The magistrate expressly found the inspection of the rear package tray to be reasonable and based upon probable cause to believe contraband was present. He observed, in relevant part:
"The third finding I would make was that there was, in fact, probable cause to search the interior of the vehicle and justify that particular search of the vehicle.
"And the fourth finding would be that there was probable cause to open and search the trunk. I'm not referring to the containers within the trunk. But I'm talking about the trunk itself. And I would find that there are, and were, the *930 specific articuable [sic] facts that seizable items may be contained, or found in the trunk.
".... .... .... .... .... ...
"So, what I am finding, finding there were specific articulable facts that specific items could be found in the trunk. That is based upon the apparent interior search. My recollection of the testimony that the smell was stronger in the back of the vehicle, although there was nothing discovered in the interior of the vehicle. I think the officer testified the area of the back seat, leaving only the area behind there."

ACTION BY SUPERIOR COURT:
In granting the motion to set aside the count alleging possession of PCP, the superior court observed:
"... With regards to what the officers put into their report as to the reasons for going into the trunk would seem to lead to an inference that the officers did go into the trunk for the purposes of ascertaining whether or not the defendant was a deputy sheriff rather than to ascertain the location of the smell, alleged smell of the PCP. And it would appear from the gist of the testimony in the transcript that the smell of the PCP has a basis for going into the back portion of the vehicle appears an afterthought arising after the preparation of the arrest report.
".... .... .... .... .... ...
"THE COURT: That is a conclusion. That is the inference that I seem to get from it, is that the smell of the PCP seems to be an afterthought that is referred to by the deputies after the preparation of the arrest report.
".... .... .... .... .... ...
"THE COURT: The Court is going to grant the motion pursuant to 995. I think the basis upon which the Court is granting is that the preliminary hearing transcript seems to establish that the search of the trunk was exploratory and made with the purpose of determining whether or not the defendant was a deputy sheriff rather than in pursuit of the odor of PCP."

DISCUSSION:
(1) Appellant's contention is well taken. It is settled that: "The superior court in ruling on a motion under Penal Code section 995 may not substitute its *931 judgment for that of the magistrate as to the weight of the evidence and every legitimate inference must be drawn in favor of upholding the information. The relationship of the superior court to the magistrate in such a situation is comparable to that of a reviewing court and a trial court. The fact-finding power including that of determining the credibility of witnesses rests with the magistrate. In our review of a superior court's ruling on a motion under Penal Code section 995, the same test is applied." (People v. Lopez (1975) 52 Cal. App.3d 263, 266 [123 Cal. Rptr. 855].)
(2) At bench the superior court's conclusionary remark that the testimony regarding the smell of PCP was "an afterthought" was a determination of credibility of part of the deputy's testimony. It was totally unsupported and contrary to the overwhelming evidence. But more egregiously and improperly, it was contrary to the prior determination by the magistrate. It thus constituted an impermissible invasion into the function and authority of the magistrate.
A review of the record herein unequivocally establishes that the deputies were confronted with an intoxicated and incoherent motorist, whose vehicle and person emitted the odor of PCP. Upon inspection, the odor became much stronger in the rear package area of the vehicle. In addition, a passenger was present, not in custody, to whom the vehicle might be released and there existed a strong possibility that a firearm was present in the vehicle. Such facts were quite sufficient to justify the warrantless search of the package area and retrieval of the leaking bottle containing PCP. (People v. Cook (1975) 13 Cal.3d 663, 670 [119 Cal. Rptr. 500, 532 P.2d 148]; cf. People v. Chavers (1983) 33 Cal.3d 462, 466-473 [189 Cal. Rptr. 169, 658 P.2d 96]; Wimberly v. Superior Court (1976) 16 Cal.3d 557, 563 [128 Cal. Rptr. 641, 547 P.2d 417].) The magistrate expressly so found and overwhelming evidence is present to support this conclusion. (People v. Fraijo (1977) 78 Cal. App.3d 977, 981 [144 Cal. Rptr. 424].)
The order setting aside count one is reversed.
Compton, Acting P.J., and Gates, J., concurred.
NOTES
[1]  The vehicle was a hatchback, with no traditional luggage compartment. Rather, the package tray was primarily accessible through a rear glass door and was partially covered by a small piece of fabric which lifted as the door was raised. This area, although accessible from within the vehicle, was more easily inspected by raising the rear door.
