During interaction with others, we perceive and produce social actions in close temporal distance or even simultaneously. It has been argued that the motor system is involved in both processes, but how does it distinguish in this processing between self and other? In this paper, we present a model of self-other distinction within a hierarchical sensorimotor system that is based on principles of perception-action coupling and predictive processing. For this we draw on mechanisms assumed for the integration of cues to generate sense of agency, i.e., the sense that an action is self-generated. We report results from simulations of different social scenarios, showing that the model is able to solve the problem of the dual use of the sensorimotor system.