
431 Mich. 381 (1988)
429 N.W.2d 574
PEOPLE
v.
ARTERBERRY
Docket No. 79382, (Calendar No. 1).
Supreme Court of Michigan.
Argued January 6, 1988.
Decided September 27, 1988.
Frank J. Kelley, Attorney General, Louis J. Caruso, Solicitor General, John D. O'Hair, Prosecuting Attorney, Timothy A. Baughman, Chief, Criminal Division, Research, Training and Appeals, and Rosemary A. Gordon, Assistant Prosecuting Attorney, for the people.
LEVIN, J.
Detroit police officers, acting with an informant, purchased heroin at a residence suspected of serving as a drug distribution site. The same day, during a thirty-minute period of surveillance, police observed seven persons make short visits to the site. On the basis of this information, the police the next day obtained a search warrant authorizing them to search the residence and "Doug," the man who had sold the heroin.
The police knocked on the door and announced *383 themselves. They heard someone running away and forced the door open. Inside they found seven persons, who were subjected to a Terry weapons patdown. Search of the site disclosed a locked toolbox. The police forced the box open and discovered inside a quantity of controlled substances. The police then searched the occupants for the key to the box, finding it in Arterberry's possession. Arterberry was arrested, and the other six occupants were apparently released.
Arterberry was charged with possession with intent to deliver various controlled substances. At Arterberry's preliminary examination, the district judge granted his motion to dismiss the charges on the basis that the search of his person for the key exceeded the scope of the warrant. The Detroit Recorder's Court and the Court of Appeals affirmed. We reverse and remand for trial.
I
The police acted within the scope of the warrant when they opened the toolbox containing the controlled substances. Upon discovering the controlled substances, the police had probable cause to arrest all seven occupants for loitering in a place of illegal occupation or business.[1] The police could reasonably have believed[2] that the seven occupants of this private residence knew that the residence was being operated as a site for the distribution of controlled substances.[3]
*384 To be sure, the officers did not assert and may not have had in mind the offense of loitering in a place of illegal occupation or business when they searched Arterberry and the other occupants. The United States Supreme Court has said, however:
[T]he fact that the officer does not have the state of mind which is hypothecated by the reasons which provide the legal justification for the officer's action does not invalidate the action taken as long as the circumstances, viewed objectively, justify that action. [Scott v United States, 436 US 128, 138; 98 S Ct 1717; 56 L Ed 2d 168 (1978).]
Since the officers had probable cause to arrest Arterberry and the other occupants, the search was proper: had the occupants been arrested, they could have then been searched incident to the arrest.[4] The validity of the search is not negated by the failure of the officers to arrest the occupants. Where officers have probable cause to arrest a group of persons and, instead of arresting them all, search them and then arrest only some of the group, they act properly. Those searched could have been arrested and then searched incident to the arrest. As explained in Peters v New York, 392 US 40, 77; 88 S Ct 1889; 20 L Ed 2d 917 (1968) (Harlan, J., concurring):
If the prosecution shows probable cause to arrest prior to a search of a man's person, it has met its total burden. There is no case in which a defendant may validly say, "Although the officer had a right to arrest me at the moment when he seized me and searched my person, the search is invalid *385 because he did not in fact arrest me until afterwards." [Emphasis in the original.][[5]]
The police acted properly in searching the seven occupants for the key.
II
The Recorder's Court and the Court of Appeals relied on the United States Supreme Court's decision in Ybarra v Illinois, 444 US 85; 100 S Ct 338; 62 L Ed 2d 238 (1979), in affirming the district judge's dismissal of the charges. In Ybarra, on the basis of the information that a bartender at a public bar possessed heroin, the police obtained a warrant permitting them to search the bartender, identified as "Greg," and the premises of the bar. The police searched "Greg" and the bar and conducted a Terry weapons patdown of everyone else in the bar. The search of the bar and of "Greg" did not disclose any illegal substances. The officers then searched one of the patrons, Ybarra, again, this time finding heroin in a cigarette packet. *386 There was no basis for this search[6] other than Ybarra's presence in the bar. There was "no reason to believe that [Ybarra] had committed, was committing, or was about to commit any offense under state or federal law." Ybarra, 444 US 91. The Court held the search invalid for lack of probable cause.
In contrast to the instant case, the police in Ybarra did not have probable cause to arrest the defendant before engaging in the challenged search. In Ybarra, the police did not, while searching pursuant to the warrant, discover controlled substances. In Ybarra, the police had no information that the bar itself was a dope house. In Ybarra, the site of the search was a public bar open to everyone, not a restricted-entry private residence.[7] In Ybarra, no one ran away when the police announced themselves. In Ybarra, there was no reason to believe that the patrons of the bar were involved in criminal activity.
In the instant case, because the police had probable cause to arrest all the occupants, who could then have been searched incident to arrest, they acted properly in searching Arterberry for the key.
Reversed and remanded for trial.
RILEY, C.J., and BRICKLEY, CAVANAGH, BOYLE, ARCHER, and GRIFFIN, JJ., concurred with LEVIN, J.
NOTES
[1]  MCL 750.167(j); MSA 28.364(j). See also People v Morris, 66 Mich App 514; 239 NW2d 649 (1976).
[2]  See Hammitt v Straley, 338 Mich 587; 61 NW2d 641 (1953), and the cases quoted therein.
[3]  While the information available  that the residence was being operated as an illegal drug distribution site, that controlled substances were found in the residence, and that at least one occupant ran from the door when the police announced themselves  constituted probable cause to arrest the occupants for loitering in a place of illegal occupation or business, this information alone might be insufficient to convict the occupants of the offense.
[4]  People v Chapman, 425 Mich 245; 387 NW2d 835 (1986).
[5]  The California Supreme Court similarly declared in People v Simon, 45 Cal 2d 645, 648; 290 P2d 531 (1955):

Thus, if the officer is entitled to make an arrest on the basis of information available to him before he searches, and as an incident to that arrest is entitled to make a reasonable search of the person arrested ..., there is nothing unreasonable in his conduct if he makes the search before instead of after the arrest. In fact, if the person searched is innocent and the search convinces the officer that his reasonable belief to the contrary is erroneous, it is to the advantage of the person searched not to be arrested. On the other hand, if he is not innocent or the search does not establish his innocence, the security of his persons, house, papers, or effects suffers no more from a search preceding his arrest than it would from the same search following it.
See also People v Cook, 153 Mich App 89, 92; 395 NW2d 16 (1986); see, generally, 2 LaFave, Search and Seizure (2d ed), §§ 5.4(a)-(b), pp 515-527.
[6]  Nor, because there was no reasonable belief that the patrons were armed and presently dangerous, was there a basis for the Terry weapons patdown. Ybarra, 444 US 92.
[7]  Professor LaFave observed:

Without suggesting that the probable cause required by Ybarra is inevitably present when the warrant is for private premises and the requisite notice is given prior to entry, it is fair to say that such a case does necessitate a somewhat different assessment than was permissible on the facts of Ybarra. [2 LaFave, Search and Seizure (2d ed), § 4.9(c), p 296. Emphasis in the original.]
