Engaging in mentalizing, i.e., reflecting on others' thoughts, beliefs and feelings, is known to facilitate later empathy and prosocial behavior. Activation in dorsomedial prefrontal (dmPFC) areas during mentalizing has been shown to predict the extent of prosocial behavior. It is unclear, however, what cognitive process drives these effects: a simulation process in which the own mental states are used as a proxy for those of others (self-projection) or an effortful other-enhancement process in which one's own perspective is overridden. In this fMRI study we examined the effects of mentalizing with similar and dissimilar others on behavioral and brain measures of empathy and prosocial behavior, to assess which cognitive process mediates the facilitative effects of mentalizing. Participants had to mentalize with two fictitious target persons, one of whom was manipulated to have similar thoughts and beliefs as the participant, while the other had dissimilar mental states. We then assessed participants' behavioral and neural responses during an empathy for pain task and a prosocial behavior task. Similarity between participant and target person increased empathy and affiliation ratings, and mentalizing with dissimilar persons evoked increased activation in ventrolateral prefrontal cortex, the extent of which was inversely related with bias towards the similar person in empathy. Responses in two dmPFC regions were also predictive of later variations in subsequent empathy and prosocial behavior, either predicting overall prosociality and empathic concern (lateral dmPFC), or predicting reduced empathic bias towards the similar person and a lower response to self-related stressors in pain matrix areas (medial dmPFC). This pattern of results suggests that generating and enhancing other-related representations while overcoming one's own perspective, rather than enhanced recruitment of self-projection processes, is driving the facilitative effects of mentalizing on later empathic and prosocial responses. (C) 2016 Elsevier B.V. All rights reserved.