Scientific and engineering innovation is vital for American competitiveness, quality of life, and national security. However, too few American students, especially women, pursue these fields. Although this problem has attracted enormous attention, rigorously tested interventions outside artificial laboratory settings are quite rare. To address this gap, we conducted a longitudinal field experiment investigating the effect of peer mentoring on women's experiences and retention in engineering during college transition, assessing its impact for 1 y while mentoring was active, and an additional 1 y after mentoring had ended. Incoming women engineering students (n = 150) were randomly assigned to female or male peer mentors or no mentors for 1 y. Their experiences were assessed multiple times during the intervention year and 1-y postintervention. Female (but not male) mentors protected women's belonging in engineering, self-efficacy, motivation, retention in engineering majors, and postcollege engineering aspirations. Counter to common assumptions, better engineering grades were not associated with more retention or career aspirations in engineering in the first year of college. Notably, increased belonging and self-efficacy were significantly associated with more retention and career aspirations. The benefits of peer mentoring endured long after the intervention had ended, inoculating women for the first 2 y of college-the window of greatest attrition from science, technology, engineering, and mathematics (STEM) majors. Thus, same-gender peer mentoring for a short period during developmental transition points promotes women's success and retention in engineering, yielding dividends over time.T he odds do not favor women in most physical sciences, engineering, and computing. Despite educational advances, women, who constitute 56% of university students in the United States (1), hold only 13-33% of bachelor's and master's degrees and 11-21% of doctoral degrees in these fields (2). Even among degree holders in engineering, computing, and physical sciences, women are less likely than men to hold jobs related to science, technology, engineering, and mathematics (STEM) degrees (2). Overall, the proportion of women in physical sciences, engineering, and computer science is very small relative to men and gets smaller still with every level of advancement (3). Engineering is notable for having one of the lowest proportions of women among all sciences (2) and is the focus of our research.Attempts to explain the relative scarcity of women engineers as due to women's "free choice" to pursue alternate career paths (4), or lower aptitude and intrinsic motivation (5), neglect widespread structural and psychological contributors to this phenomenon (6, 7). Many engineering environments are subtly unfriendly or sometimes overtly hostile for women (8, 9). The numeric scarcity of women (10, 11), nonverbal behavior from male colleagues that excludes women from professional conversations (12), use of masculine pronouns to refer to all sc...