*4OPINION
Per Curiam:A criminal complaint charged that respondent sold two (2) balloons of diacetylmorphine (heroin) to Las Vegas Police Officer Kent Clifford, in violation of NRS 453.321 and NRS 453.161. After a preliminary examination respondent was ordered to stand trial for the offense and a criminal information was then filed in the district court.
Thereafter, respondent filed a pretrial petition for habeas corpus, contending the information was fatally defective because the proof adduced at the preliminary examination showed the sale had been made to an undercover agent, acting as an intermediary, and not to Officer Clifford. The district court agreed and granted the writ of habeas corpus. Appellant contends the writ was improperly issued.
The sole issue we need to resolve is whether or not an accused is subject to prosecution for the sale of a controlled substance when the proof adduced at the preliminary examination shows the sale was consummated through a third party. We conclude that, in the factual context of this case, respondent is subject to prosecution.
The record reflects that Officer Clifford, together with an undercover agent, drove to the Las Vegas west side and parked his car some 10 to 15 feet from the rear entrance of Kelly’s Liquor Store. The undercover agent got out of the car and met respondent near the rear entrance to the store. After negotiating a price for the heroin the agent walked back to the car and reported to Officer Clifford. Clifford, being satisfied with the terms, gave the undercover agent the agreed amount of money. The agent walked back to respondent, exchanged the money for the heroin, and delivered it to Officer Clifford. Clifford testified that he could not hear all of the conversation between Hodges and the agent but that he did visually observe the entire transaction, which took place in broad daylight.
Our legislature has made it “unlawful for any person to sell, exchange, barter, supply or give away a controlled or counterfeit substance.” NRS 453.321(1). Whether Hodges made the sale directly to Officer Clifford, or through the conduit of the undercover agent, is neither determinative of, nor critical to, the issue of whether or not the crime was committed.
Under our statute it is not necessary that the buyer deal *5directly with the seller, in order to sustain the charge. See People v. Taylor, 338 P.2d 377 (Cal. 1959), which held that the fact that the parties dealt with each other through a third person was immaterial, and such proof was sufficient to sustain a conviction. Compare Tellis v. State, 84 Nev. 587, 445 P.2d 938 (1968), where the accused was charged with the unlawful sale of narcotics to an informer. The proof in Tellis, as here, showed the parties had dealt with each other through an intermediary and we affirmed the conviction.
Reversed.