An officer who has a reasonable suspicion that you have committed or are in the process of committing a crime has the authority to detain you. If there is reason to suspect that you are armed and dangerous, the officer can pat you down, or in other words, frisk you. This kind of search is widely known as a Terry frisk, named after the Supreme Court decision of Terry v. Ohio. (392 U.S. 1 (1968).) A Terry frisk must be limited—at least initially—to a search for weapons.
Officers must confine these kinds of frisks to the suspect's outer clothing—they can't go rummaging through your pockets. If, however, the officer feels something like a weapon during the frisk, he or she can reach into your clothing and retrieve it. Even if the object isn't a weapon, a court will consider it to have been lawfully discovered if it reasonably appeared to be a one. In fact, an officer who feels something during a Terry frisk that obviously isn't a weapon, but is obviously contraband, can seize it.
On the other hand, if the officer can't tell from a frisk what the object is—only that it isn't a weapon, he or she can't explore it further. For example, the officer can't squeeze it, slide it around, and otherwise manipulate it. (Minnesota v. Dickerson, 508 U.S. 366 (1993).) That said, the officer may be entitled to ask the suspect about the object. (State v. Scott, 518 N.W.2d 347 (Iowa 1994).)
If an officer didn't have a legal basis for a Terry frisk or went beyond the limits of such a search, the resulting evidence will be normally inadmissible in court—if the defense files a motion to suppress evidence.
Officer Sydnor receives a dispatch call informing him of a report of two men smoking some kind of narcotic in a nearby parking lot. He drives to the parking lot and sees two men, Johnny and Bubbles; they match the description of the smokers.
Officer Sydnor, dressed in uniform, gets out of his car and begins to walk toward Johnny and Bubbles, who happen to be walking in his direction. He asks for their identification, but they ignore him. As he gets closer, he requests their identification a second time, then notices the smell of burt marijuana coming from Johnny.
Johnny and Bubbles ignore Sydnor again and walk past him. Johnny turns around to face Sydnor, puts his hands in his front pockets, and walks backwards. Sydnor sees that Johnny is acting nervously and suspects that he might be hiding a weapon. He asks Johnny to remove his hands from his pockets, but Johnny refuses. Sydnor approaches Johnny, takes Johnny's hands out of his pockets, orders him up against a nearby wall, and tells him to assume the frisk position.
When Sydnor starts the frisk, Johnny refuses to separate his feet. Sydnor forces them apart and pats down Johnny's left leg. He feels a hard object, about three inches wide and four or five inches long, in Johnny's boot. Believing that the object might be a gun, Sydnor lifts up Johnny's pant leg, revealing in the boot a package tightly wrapped in plastic. Still not sure that it isn't a weapon, Sydnor reaches into the boot and grabs the package, which contains crack cocaine.
Officer Sydnor's search was valid; the crack cocaine evidence will be admissible in court. He limited his initial search to a pat-down of Johnny's exterior clothing (and shoes), he thought that the bulge might be a gun, and he was reasonable in still not knowing whether it was a gun immediately before grabbing it. (United States v. Harris, 313 F.3d 1228 (10th Cir. 2002).)
For more on the scope of Terry frisks, see The Difference Between a Police "Search" and a "Frisk."