We develop a two sector competitive equilibrium model that rationalizes the gender pay gap by the coexistence of two mechanisms: a statistical discrimination mechanism linked to a stereotype belief in which women engage in child-rearing activities while men do not and a self-selection mechanism that makes men and women choose differently among unskilled jobs based on their physical endowments. We prove the existence of a competitive equilibrium where the gender pay gap arises. The model explains other empirical regularities related to women in the workplace like the motherhood penalty and the reversal education trend. We found that technological advancements reduce the gap among unskilled workers while an equal parental leave policy can reduce the gap among skilled workers. We study an Equal pay for Equal work policy and that in our model it may be an ineffective way to reduce the gender pay gap The version here presented corresponds to the updated study.