L.P.
Hi H.,
One of the things I learned with my daughter as soon as she was old enough to say "No" was not to give her too many choices. For instance for snack I would ask her to pick a banana or an apple or at play time she could choose between play-doh or finger paints. Making small decisions like this would give her enough control (since this behavior is all about control - a power struggle) that she could feel good about. However, if she acted rudely in anyway, I would take away her options all together and choose for her - this was the worst punishment for her - But I'd let her know that it was due to her actions and that to get to choose again she would need to show good behavior. I agree with the other mom who stresses consistency because once you give in, any progress you've made will vanish. Lastly, it helps to have a "no-nonsense voice" when my daughter is misbehaving, I lower my voice a few octaves and give her a hard stare. She knows I mean business and usually stops what she's doing. But I make sure I stick to whatever threat goes along with that reprimand such as "time Out" or putting that toy away, etc. It all goes back to consistency.
I hope this helps. Take care.
PS. Oh, I forgot to say that it's also okay for you talk with your daughter about how her behavior affects you. You could say, " when you do X it really makes me angry, please don't do that because I don't like getting angry with you" or you could say "how would you feel if I did x just like you did with me today?" - You may feel that she's too young and will not understand what you are saying but she is smarter than you think and will soon learn to be compassionate.