Defendant was sentenced for ten to fifty years of imprisonment for trafficking in heroin in violation of § 30-31-20, N.M.S.A. 1978. On appeal, he asserts that his conviction should be reversed because 1) the affidavit on which the search warrant was based was deficient and 2) the trial court should have held an in camera hearing to determine the necessity of producing the confidential informant.
On May 4, 1979, the Carlsbad police searched Room 50 of the LorLodge Motel in Carlsbad pursuant to a duly executed search warrant. When defendant arrived at the room, he was searched by police and thirty-six tiny balloons of heroin were seized from him. The affidavit on which basis the search warrant was issued was signed by Lieutenant Tully of the Carlsbad Police Department and stated:
1. On 5-4-79 a confidential informant told affiant that two (2) persons, one whom he knows as Frank and the other as Javier, residing in room 50 of the LorLodge Motel, are in possession of a quantity of Heroin.
2. This informant told affiant that the two persons had a white older model Dodge with a Texas license plate.
3. This informant told affiant that he had observed the quantity of Heroin in the possession of both Javier and Frank.
4. Affiant knows this informant to be a member of the criminal element and as such to be in such a position to learn the facts reported above; further, affiant knows this informant to be reliable in that over the past several years this informant has provided affiant with information which has directly resulted in the arrest and conviction of four (4) persons for felony controlled substance violations, and the recovery of over $2,500.00 worth of stolen property.
5. Affiant contacted the clerk at the LorLodge Motel and learned that room 50 is rented to one Javier Romero and two (2) other persons whose names are not known by the clerk.
6. The LorLodge clerk stated that the individuals had not written down the license of the vehicle they arrived in and had hidden the vehicle thereafter, behind a swimming pool building, a fact which the clerk thought suspicious and thereafter, noted for herself the type of vehicle and license number which she said was a white 1968 Dodge bearing Texas license BGS 154.
7. Affiant made a computer check of Texas license BGS 154 and found it to be registered to one Javier Ramirez of El Paso, Texas.
8. Affiant also personally verified that the vehicle belonging to the defendant is concealed at the LorLodge Motel.
9. Affiant believes, as a result of the concealing of the vehicle and the use of a fictitious name, both actions which are from affiant’s training and experience consistent with criminal activity, that the information provided by this reliable informant is true and correct and that therefore, the persons in room 50 of the LorLodge Motel are in possession of Heroin.
After a hearing, defendant’s motion to suppress the evidence seized on the basis of the insufficiency of the affidavit was denied. Defendant also moved that the identity of the confidential informant be disclosed, pursuant to N.M.R.Evid. 510(c)(2), N.M.S.A. 1978. The court proposed, and the parties agreed, that he would rule on this matter after an in camera meeting with the informant to determine if the informant would be able to give testimony relevant and helpful to the defense or necessary to a determi*204nation of the defendant’s guilt or innocence. It was stipulated that defense counsel could submit interrogatories to the judge as suggested questions to be asked the informant. The court agreed to allow the informant to answer the questions in writing rather than requiring that he be present at the in camera proceeding. On the day of trial, September 20, 1979, the court reviewed the defendant’s motion and concluded that it should be denied because defendant was unable to show that the informant’s testimony would be relevant and helpful to the defense or necessary for a fair determination of guilt or innocence. The judge noted at this time that he had been informed that the district attorney had been unable to contact the informant. The defendant then moved for dismissal of the charges under Rule 510 (c)(2), which motion was denied.
1. The affidavit.
The Fourth Amendment to the United States Constitution, which is applicable to the states through the Fourteenth Amendment, and Article II, Section 10 of the New Mexico Constitution require that warrants not be issued except on a showing of probable cause.
“Probable cause” means a reasonable ground for belief of guilt. It exists where the facts and circumstances within the knowledge of the officers, based upon reasonably trustworthy information, is sufficient to warrant a man of reasonable caution to believe that an offense has been or is being committed.
State v. James, 91 N.M. 690, 694, 579 P.2d 1257, 1261 (Ct.App.), cert. denied, 91 N.M. 751, 580 P.2d 972 (1978). Probable cause for issuing a search warrant may be based on hearsay “provided there is a substantial basis for believing the source of the hearsay to be credible and for believing that there is a factual basis for the information furnished.” N.M.R.Crim.P. 17(f), N.M.S.A. 1978. This standard is derived from Aguilar v. Texas, 378 U.S. 108, 84 S.Ct. 1509, 12 L.Ed.2d 723 (1964), where the Supreme Court said:
Although an affidavit may be based on hearsay information and need not reflect the personal observations of the affiant . . . the magistrate must be informed of some of the underlying circumstances from which the informant concluded that the narcotics were where he claimed they were, and some of the underlying circumstances from which the officer concluded that the informant, whose identity need not be disclosed . . . was “credible” or his information “reliable”. (Cites omitted.)
Id. at 114, 84 S.Ct. at 1514. Thus, in order for an affidavit based on hearsay to support a search warrant, the affidavit must show two things: 1. the underlying circumstances showing how the informant obtained his information; and 2. the underlying circumstances showing why the affiant has reason to believe the informant. See, Hudson v. State, 89 N.M. 759, 557 P.2d 1108 (1976), cert. denied, 431 U.S. 924, 97 S.Ct. 2198, 53 L.Ed.2d 238 (1977).
Both prongs of the Aguilar test were met by the affidavit, which is valid on its face. The statement in the affidavit that the informant saw the defendant in possession of heroin was sufficient to satisfy the first prong of the Aguilar test, because it established that the informant obtained his information through personal observation. State v. Cervantes, 92 N.M. 643, 593 P.2d 478 (Ct.App.), cert. denied, 92 N.M. 621, 593 P.2d 62 (1979). The second prong of the Aguilar test was met by the statement in the affidavit that the affiant knows the informant to’ be reliable because he has provided him with reliable information concerning narcotics violations in the past. Id.
2. Disclosure of the confidential informant.
Rule 510 of the Rules of Evidence establishes the so-called “informer’s privilege” which is really the privilege of the state not to disclose the identity of a person who has provided the state with information concerning a possible violation of the law. One exception to the privilege is when the informer in a criminal case can give testimony that is relevant and helpful to the accused or necessary for a determination of *205his guilt or innocence. If the trial court finds there is a reasonable probability that the informer can give such testimony, and the state still refuses to disclose his identity, the judge shall dismiss the charges to which the testimony would relate. N.M.R. Evid. 510(c)(2), N.M.S.A. 1978. The rule provides a method whereby the judge may learn the contents of the informer’s testimony and so determine whether or not that testimony is helpful to the defense or necessary for a determination of guilt or innocence. The method is an in camera showing of the informer’s testimony, either through affidavit or direct examination of the informer. Id. In State v. Robinson, 89 N.M. 199, 549 P.2d 277 (1976), the New Mexico Supreme Court sanctioned the use of the in camera hearing to determine whether or not the state should be ordered to disclose the informer’s identity.
The trial court properly ordered the in camera hearing. The defendant was tried and ultimately convicted on the charge of trafficking in heroin, not mere possession. He claimed that the informant was present when the transaction occurred, and alleged that the informant could provide information helpful to a defense of entrapment. The defendant made the prerequisite showing that the informant would be helpful or necessary to the defense, and so stimulated the in camera provision of Rule 510(c)(2). The trial court erred in its subsequent ruling that the defendant had failed to make the preliminary showing.
However, the defendant here has no relief. When the court has ordered the state to produce the informant for an in camera hearing, and the state is unable to comply, the court is not obliged to dismiss the case if the state has demonstrated that it made reasonable efforts to find the informant. State v. Carrillo, 88 N.M. 236, 539 P.2d 626 (Ct.App.1975). The court had evidence that Lieutenant Tully had checked, to no avail, various locations which he knew the informant frequented, that he had no firm address and no telephone nu.nber for the informant, and that in the past he had been able to locate him only rarely, and that his usual contacts with the informant had been coincidental street contacts. Thus, although the trial court did not make a specific finding as in Carrillo, the facts are sufficient to support a conclusion that the State had diligently sought the informant’s whereabouts and simply had been unable to locate him. Where the informant is unavailable to the state, there is no sanction against the State upon a showing that a diligent search had failed to reveal the informant. Id. The trial court did not err in refusing to dismiss the charges.
The judgment of the trial court is affirmed.
IT IS SO ORDERED.
HERNANDEZ and WALTERS, JJ., concur.