B.E.
I have to be honest - however much I hate the idea of any type of physical punishment, this is the one situation where I finally had to hit back. Mine picked it up somewhere before 2 and the situation continued for about 10 months. I have no idea where he learned to hit - this was well before nursery school. I tried everything - timeouts (which he hated but he always sat out his time), taking away toys, redirecting, telling him how much it hurt Mommy, yelling. Nothing worked and this kid could hit HARD. The only silver lining to the situation was that he almost never hit other kids - only Mommy.
Soooo, one day I finally had it after he slapped me very hard in the face and I slapped him back - not nearly so hard as he hit me, but enough to shock him. I guess I wanted to let him know what it felt like, because I honestly think he had no idea.
That did not put an immediate end to the problem and I had to repeat it one or two more times, reinforced by timeouts, but it was very shortly thereafter that he stopped hitting. Since then (my son's almost 5 now) I can count on my one hand the number of times he has hit. Occasionally, he has put his hand out as if to hit, but stops himself.
I really don't like recommending this method, but if nothing else works you might have to try it. Personally, I've never had to physically punish him since that time and he responds quite well to timeouts.