
383 Mass. 655 (1981)
421 N.E.2d 447
COMMONWEALTH
vs.
JAMES A. HARRIS.
Supreme Judicial Court of Massachusetts, Suffolk.
February 3, 1981.
June 2, 1981.
Present: HENNESSEY, C.J., BRAUCHER, WILKINS, LIACOS, & ABRAMS, JJ.
Randolph M. Gioia for the defendant.
M. Catherine Huddleson, Legal Assistant to the District Attorney (Michael J. Traft, Assistant District Attorney, with her) for the Commonwealth.
BRAUCHER, J.
After a jury-waived trial in the Boston Municipal Court, the defendant was convicted of possession of class C (LSD) and class D (marihuana) controlled substances. He claims error in the denial of his motion to suppress the controlled substances. The LSD was discovered as a result of a routine search when he entered the Suffolk County Court House; the marihuana was discovered in an inventory search at the police station following his arrest. The judge ruled that the defendant consented to the search *656 at the court house. We transferred the case to this court on our own motion, and we affirm the convictions.
We summarize the evidence presented at the hearing on the motion to suppress. On January 18, 1980, the defendant entered the Suffolk County Court House, and went through a metal detector. In front of the detector was posted a sign warning the public of a search.[1] Like about 85 per cent of those who enter, the defendant activated the detector. A security officer explained the procedure to the defendant, telling him that persons who set off the detector were to be "frisked." A frisk disclosed a vial in the defendant's pocket; the officer asked the defendant to take it out, and the defendant did so. Asked what was in the vial, the defendant said "it was nothing, just pills, a pill box." The officer said he would have to keep it, since there was no prescription written on it. The defendant said, "all right," and was given a receipt. A second officer, who had ten years' experience in the drug control unit, expressed the opinion that the vial contained LSD, and when the defendant returned and signed a receipt for the vial he was arrested. At the police station marihuana was found in the defendant's pocket.
We take judicial notice, as have other courts, that threats of violent acts directed at court houses have given rise to an urgent need for protective measures. McMorris v. Alioto, 567 F.2d 897, 899 (9th Cir.1978). Downing v. Kunzig, 454 F.2d 1230, 1231 (6th Cir.1972). Barrett v. Kunzig, 331 F. Supp. 266, 269 (M.D. Tenn. 1971), cert. denied, 409 U.S. *657 914 (1972). The protective measures taken raise problems comparable to those presented by airport searches, and the legal analysis has been similar. See 3 W.R. LaFave, Search and Seizure, §§ 10.6, 10.7(a) (1978). Where a search of persons entering a public place is necessary to protect a sensitive facility from a real danger of violence, an "administrative search" without a warrant may be justified. "The search must be limited and no more intrusive than necessary to protect against the danger to be avoided, but nevertheless reasonably effective to discover the materials sought. The inspection must be conducted for a purpose other than the gathering of evidence for criminal prosecutions." McMorris v. Alioto, supra at 899.
In the present case the initial search by a metal detector was limited, and was no more intrusive than necessary. Activation of the detector warranted a further investigation for metal, but it was also reasonable to inspect any packages for such lethal nonmetallic contents as explosives or corrosive acid. There is no indication of any ulterior purpose or subterfuge, and the officers appear to have behaved in a courteous, respectful, and orderly manner. The defendant was not singled out for different treatment from others similarly situated, the search could not have been a surprise to him, and he made no objection. Although elements of coercion were inherent in the situation, the element of voluntariness reduced the intrusiveness of the procedure. See United States v. Albarado, 495 F.2d 799, 807-808 (2d Cir.1974). We do not accept the conclusion suggested by the Albarado case (id. at 809-810) that the pat-down disclosing the vial in the defendant's pocket was fatally intrusive. Even though the defendant's consent was insufficient to validate a full-scale search for evidence of crime under Schneckloth v. Bustamonte, 412 U.S. 218, 247-249 (1973), we think the judge's finding that the search was consensual was warranted in the same way as in the airport search cases. McMorris v. Alioto, 567 F.2d 897, 901 (9th Cir.1978).
*658 Once the officers had probable cause to believe that the vial contained LSD, its seizure and the arrest of the defendant were valid even though drugs were not the object of the search. United States v. Skipwith, 482 F.2d 1272, 1277-1278 (5th Cir.1973). The inventory search at the police station was also proper. The motion to suppress was properly denied.
Judgments affirmed.
NOTES
[1]  "For the protection of the public, all persons entering these premises must pass through the metal detector. If the detector registers, that person will be subject to a limited search. All packages, briefcases, pocketbooks or other items carried by a person must be offered for inspection. All legally registered weapons must be produced and surrendered to the deputy sheriff and may be re-claimed upon leaving the Courthouse. Any illegal weapons or other contraband discovered in the course of these search procedures will be seized.

"Entrance into this Courthouse, shall be deemed to constitute consent to the performance of all of the above security procedures." The notice was signed by the court house commission.
