To reduce anxiety, avoid punishment, and maintain parental affection, children form a superego by identifying with the same-sex parent. In this process, children internalize the parents' standards of right and wrong, and the child turns inward the hostility that was previously aimed externally at the same-sex parent. This hostility is now guilt, which is experienced unconsciously.