Women are underrepresented in STEM (science, technology, engineering, and mathematics) careers, and this poses new challenges at the dawn of the era of digital transformation. The goal of the present study is to demonstrate how female role models influence girls' preferences for STEM studies. This paper evaluates a role-model intervention in which female volunteers working in STEM go into schools to talk to girls about their careers. The study was conducted with 304 girls, from 12 years old (sixth primary grade) to 16 years old (fourth secondary grade), both before and after the role-model sessions. An adaptation of the expectancy-value theory of achievement motivation is used to test the extent to which this role-model intervention improves girls' beliefs that they can be successful in STEM fields and increases their likelihood of choosing a STEM career. The results of multigroup structural equation modeling analysis show that on average, the role-model intervention has a positive and significant effect on mathematics enjoyment, importance attached to math, expectations of success in math, and girls' aspirations in STEM, and a negative effect on gender stereotypes. Additionally, the female role-model sessions significantly increase the positive impact of expectations of success on STEM choices. Finally, the moderation role of the counterstereotypical content of the role-model sessions is tested. The results show that the higher the counterstereotypical character of the sessions, the higher the relationship between expectations of success in math and the choice of STEM. These results are discussed regarding their implications for long-term STEM engagement.