We happen to have discussed this recently in several threads.
You do have to obey a lawful order, which instruction to step out of the car would appear to be. Absent any reasonable suspicion that a crime has been committed, the officer must limit his search to a search of the immediate area, and is only allowed to search for items which might compromise his safety.
One way to counter that is to lock and close the door as you exit the vehicle. At that point, the interior of the car is not accessible to you (or him) and is no longer the "immediate area." Ergo, nothing in that car represents an immediate threat to his safety. He may frisk you for weapons -- but only for weapons. Anything else (illegal) he finds may be confiscated, but may not be used to incriminate you in court.
He cannot -- short of having probable cause (for example, a concrete and reasonable belief that you've committed a crime) -- open your locked vehicle and search it.
Now, he may make any number of claims later (I smelled pot, etc.) and if he chooses to go ahead with a search you cannot legally try to stop him. However you should document the incident and make the best preparation you can for fighting it and protesting it afterward.
Remember: neither your NRA sticker, your Guns&Ammo magazine on the seat of the car, nor your statement that you do not consent to searches constitute ANY reasonable suspicion that you've committed a crime.
Not exactly...If a person is sitting on the curb while the officer goes back to his car to run the person, the person still has access to the car. The person would be much closer to the car than the officer, and still is able to unlock the car to get into it. Even if the person gave the keys to the officer, the officer has no way to know if the person has another set of keys. However, the officer still needs an original reason as to why he feels his safety could be in jeapordy.
Also, when frisking for weapons, weather it be in the car or on someone's person, any other contraband found can be used against the individual, and the person can be arrested for it. This is based on Minnesota Vs Dickerson in which a Dickerson was frisked for weapons. The officer felt a lump in Dickerson's jacket, which the officer was able to articulate was a bag of drugs, and Dickerson was arrested. The supreme court ruled the officer did not have a reason to frisk the subject, however, if the frist had been lawful, if the officer can articulate that while they are frisking a subject for weapons, and they find contraband, the subject can be arrested.
Keep in mind, just because you do not know what the reasonable suspicion or probable cause is for an officer frisking or searching your car, does not mean the officer does not have it. For example, I am a white male in my 20s. I drive a gray Nissan pick up truck. Say I am wearing a white shirt and jeans. A bank gets robbed at gun point, and the suspect is a white male in his 20s wearing a white shirt and jeans. He leaves in a gray nissan pick up truck. Even if I have nothing to do with the robbery, and officer that sees me driving around the area of the robbery can stop me. Because a robbery is a violent offense, the officer can articulate that his safety could be in jeapordy, and therefore, he can frisk me and the car for weapons. Locking the doors to the car after I get out and refusing to open it for him could be considered interfering with the investigation, or refusing to comply with a lawful order, both of which are arrestable offenses.
Another example is say you are going to the gym or to a friends house, and you will only be gone a short time, so you forget to take any form of ID. I'm not sure about in other states, but in AZ, driving a car without ID is a crime, which you can be arrested for. If you get pulled over, the officer can arrest you. Arizona Vs Gant says the officer can search your car for evidence of the crime you committed, which is failure to provide ID. The officer can search your car for ID, and any contraband found can be used against you.
Bottom line, you do not have to consent to a search of you vehicle, but there are so many different laws and rules that police officers can use to get into your vehicle, that they probably don't need consent.
With regards to the OP, my advice would be exit the vehicle, but don't consent to a search. Your refusal of consent alone does not give the officer consent to search. Just know, the officer could already have all the reasonable suspicion or probable cause he needs to get into your car, so don't try to resist or refuse if he goes ahead with his search. If your constitutional rights have been violated, you can always sue.