Is he the only child? Some behavioral traits are attributed to birth order.
At this age, in addition to explaining it to him, praise altruistic and flexible behavior. Find out if his behavior is triggered by anxiety (when he wants to control the situation or is he just inflexible and controlling?
If removing him from the situation calms him down, let him go back to the activity only if he agrees to try and be flexible with his peers. If he tells you that he is not ready to try that, then let him know what other options there are (either he goes home, you assign a consequence ex: no TV watching that day, doing an extra chore- just anything that he would perceive as a negative outcome) If he is compliant or you see that he is trying to change his actions, you can also reward that ex: adding extra TV time, special treat, etc.
Other adults in his life- grandparents, family members, would want to engage in the same kind of teaching/disciplining with him.
He is still learning how to relate to others and how his own behavior leads to either pleasant or unpleasant outcomes.
You can also practice some of the social behaviors you'd like him to develop at home during pretend play with him. Equine therapy can also be beneficial.