A traffic stop normally ends with a citation—the annoyed motorist simply drives away. But an officer will sometimes prolong a traffic detention, in the process searching the driver's vehicle.
In some instances, an officer who has stopped a vehicle has a legal justification for searching it. Other times, that justification doesn't exist. For example, if an officer doesn't witness any apparent traffic violation or have any other objective basis for pulling a car over in the first place, any evidence that turns up from a car search will probably be inadmissible in court.
Even when there's a lawful basis for a traffic stop, an officer who issues you a citation can't search you or your car without a basis to suspect that you are armed and dangerous or involved in criminal activity (other than the minor traffic violation).
A 2018 U.S. Supreme Court case—about unauthorized rental car drivers—illustrates the principle that the police can't search a car just because they've stopped it. The practical rule from that case is that police may not search a rental car after a traffic stop based only on the fact that the person driving isn't on the rental agreement. Someone who has permission to use a car from the person who rented the car doesn't lose all Fourth Amendment rights merely by not being on the rental agreement. (Byrd v. U.S., 138 S.Ct. 1518 (2018).)
Despite the rule above, there are plenty of circumstances where officers can search cars they've stopped. Laws in many states authorize police officers to arrest drivers for minor traffic offenses, such as speeding or failure to wear a seatbelt. In these and other arrest situations, the validity of a subsequent search depends on the circumstances.
After arresting an occupant, the police typically may search the passenger compartment of a vehicle if it reasonably appears that the arrestee might access the vehicle during the arrest or that the vehicle contains:
The ensuing search must be limited to areas that might contain the items the searching officer reasonably expects to find.
If, for example, officers have arrested a motorist for driving on a suspended license, handcuffed him, and placed him in a locked patrol car, they don't have a lawful basis to search the car. The driver isn't able to access the car at the time of the search, nor can the officers reasonably expect to find evidence of the crime for which they arrested him: driving on a suspended license. (Arizona v. Gant, 556 U.S. 332 (2009).)
Even without an arrest, an officer who sees, hears, or smells something suspicious during a traffic stop can search the car—without a warrant. For instance, if the officer sees a baggie containing white powder in the back seat, the officer would likely have probable cause that illegal drugs are in the vehicle.
Even where no other justification exists, police can search a car if the driver gives permission. An officer doesn't have to tell the driver that giving consent is optional, but it's perhaps easier in theory than in practice to say "no" to a police officer.
The trick with consent is that it must have been "freely and voluntarily given" to be legit. Consent that is coerced is invalid, and so is the search that follows. To determine whether consent was voluntary, courts look at all the circumstances of the encounter. (Bumper v. North Carolina, 391 U.S. 543 (1968).)
When police lawfully impound a vehicle, they're allowed to open it and take inventory of the loose contents. It doesn't matter if police don't have probable cause, because an inventory search—at least in theory—isn't designed to gather evidence. Instead, the theory of inventory searches is that when police tow and store a car, they should be able to make a record of what's inside. An inventory search allows them to protect the car's contents. It also allows them to safeguard themselves—against any dangerous items in the car and claims that they stole or mishandled items.
If police run across incriminating evidence during an inventory search, the evidence can typically be used against the defendant.
If you face criminal charges, regardless of whether they stem from a car search, consult an experienced criminal defense attorney. An attorney who knows the law in your jurisdiction will be able to explain the relevant rules, including any exceptions to the general principles discussed in this article.