OPINION OF THE COURT
JONES, Senior Judge:The appellant was convicted of willfully disobeying an order and wrongfully possessing heroin in violation of Articles 90 and 134, Uniform Code of Military Justice, 10 U. S.C. §§ 890 and 934. We are reviewing the case pursuant to Article 66, UCMJ.
The order which appellant was convicted of disobeying was an order to empty his pockets. It was given during the course of an in-ranks procedure variously described as a health and welfare inspection (by the Government) and an illegal search (by the appellant). The heroin and a hypodermic syringe and needle were found inside two envelopes which the appellant eventually took from his pocket. Additional heroin was found in his wallet. The appellant contends that the order to empty his pockets was illegal and the heroin should have been suppressed as the product of an illegal search.
The facts are not disputed. The appellant’s battery commander decided to hold a “health and welfare inspection” to look for contraband such as knives and illegal ration, meal, and ID cards. The inspection was planned about two weeks in advance; it was held during duty hours; and there was no specific information that led the commander to suspect the appellant or any other member of the battery of possessing drugs.
The portion of the inspection involved here was held in-ranks in the hallway of the barracks. Earlier the first sergeant had made a walk-through inspection of rooms. The battery was divided into three ranks with an officer inspecting each rank. Each soldier was required to empty the contents of his pockets into a helmet. Shortly after the inspection started, the appellant realized its nature, left the formation, and tried to leave the area. He was stopped by a sergeant and the battery commander was called. The commander explained the procedure being followed and ordered the appellant to empty his pockets. The appellant refused, stating the order was illegal. The commander again ordered appellant to comply and again appellant refused. Desiring to avoid further confrontation, the commander had the military police summoned. Upon arrival, the military policemen explained to appellant that if he didn’t comply with the order they would take him to the station house. Appellant thereupon complied. The syringe, needle and 18 packets of heroin were found in two envelopes; another packet was found in his wallet.
With this background information, we must determine whether this was an inspection or a search; and, if the latter, whether it meets fourth amendment standards as applied within the military.
A military inspection is an examination or review of the person, property, and equipment of a soldier, the barracks in which he lives, the place where he works, and the material for which he is responsible. An inspection may relate to readiness, security, living conditions, personal appearance, or a combination of these and other categories. Its purpose may be to examine the clothing and appearance of individuals, the presence and condition of equipment, the state of repair and cleanliness of bar*656racks and work areas, and the security of an area or unit. Except for the ceremonial aspect, its basis is military necessity.
Among the attributes of an inspection are: that it is regularly performed; often announced in advance; usually conducted during normal duty hours; personnel of the unit are treated evenhandedly; and there is no underlying law enforcement purpose.1 An inspection is distinguished from a generalized search of a unit or geographic area based upon probable cause in that the latter usually arises from some known or suspected criminal conduct and usually has a law enforcement as well as a possible legitimate inspection purpose.
The inspection in this case was planned in advance, held during duty hours, and applied evenly to all personnel. To that extent it had the attributes of an inspection. Turning to its purpose, we must see if it was justified by military necessity for, as “the power to intrude arises from necessities of military life, then it ought to be exercised no further than those necessities require."2 The commander testified that he was looking for unauthorized ration control cards, meal cards, identification cards, and knives. He did not mention drugs even though he had tried to arrange for the participation of a marihuana dog.
The prosecution did not establish, and neither can we find, any military necessity to support the intrusion into the soldiers’ pockets and wallets here. The illegal cards could have been controlled and detected by stricter procedures on issuance and use. Although a check for prohibited knives can be a proper subject during the inspection, the intensity of the check here exceeded any demonstrated necessity. Accordingly, we find the inspection to have been in reality a generalized search.
A generalized search of a specific area or of a particular group of soldiers is permissible when based upon probable cause. United States v. Drew, 15 U.S.C.M.A. 449, 35 C.M.R. 421 (1965); United States v. Gebhart, 10 U.S.C.M.A. 606, 28 C.M.R. 172 (1959).3 Thus, if this search is to be justified, it must be based upon probable cause. Such justification does not appear in the record. There was no showing that illegal knives were a problem in the barracks or had been seen therein; or that the possession and use of false ID, ration, and meal cards were plaguing the unit or adversely affecting military discipline, security, or privileges. Neither can we find any other basis for the search. Accordingly, the heroin that was found in the illegal search should not have been admitted into evidence.
We turn finally to the question of the legality of the order given to appellant by his company commander to empty his pockets. Appellant maintains the order was illegal as it forced him to incriminate himself in violation of Article 31(a), UCMJ. We agree. Appellant knew that compliance with the order would incriminate him, and even though he did not specifically so state, we are convinced that that was the basis for his refusal. Therefore, “to the extent that [the order] required the appellant to participate, without his consent, in the production of evidence which was self-incriminating, [the order] was . . . violative of Article 31, Uniform Code of Military Justice.” United States v. Kinane, 24 U.S.C.M.A. 120, 51 C.M.R. 310, 1 M.J. 309 n. 1 (1976). Accord United States v. Ruiz, 23 U.S.C.M.A. 181, 48 C.M.R. 797 (1974); United States v. Pyatt, 22 U.S.C.M.A. 84, 46 C.M.R. 84 (1972). As this order violated that article, the conviction for disobedience must also fall.
*657The findings of guilty and the sentence are set aside. The charges are dismissed.
Judge FULTON and Judge FELDER concur.. This does not mean that valid inspections could not be unannounced, during nonduty hours, or at irregular intervals. For maximum effectiveness, inspections must sometimes vary from the routine.
. Hunt, Inspections, 54 Mil.L.Rev. 225, 246 (1971).
. See United States v. Fontennette, 3 M.J. 566 (A.C.M.R.1977), and United States v. Mitchell, 3 M.J. 641 (A.C.M.R.1977), for discussions of the present state of the law on the subject of generalized searches.