The goal of the present research is to devise a model for specifying the role of spiritual correspondence and compensation process in the formation of identity. 810 students were selected by multistage sampling method from the universities in Tehran and completed Childhood Attachment, Increase of Religious Values, Attachment to God, and Ego Identity Status scales. The data were analyzed by exploratory and confirmatory factor analysis and structural equation modeling. The resulting model showed that secure attachment to God mediated the relationship between secure to parent achieved identity; also, avoidance attachment mediated the insecure to parent and moratorium and diffusion identity status. Furthermore, ambivalence attachment to God mediated the relationship between insecure to parent and foreclosure identity status. There fore, parental attachment does not have a significant direct effect on identity status and attachment to God mediates the relationships. But the model showed that the increase of insecure individual religious values by secure attachment to God is indirectly associated with achievement identity. However, association between parental attachment and attachment to God confirms the correspondence and compensation (increase of insecure individual religious values) hypothesis. There fore, the dimensions of secure attachment to God (correspondence and compensation process), namely Haven of Safety and Secure Base facilitate the process of exploration, resolving the exploration crisis, development of commitment, and formation of achieved identity.