Engineering has a woman problem—one that starts early and snowballs over time.
To begin with, few women choose the engineering track in college: Only 20% of engineering students are female. And even those who do get the degree are relatively unlikely to go on to work in the field. Indeed, one study found that nearly 40% of women who study the discipline either quit or never actually take an engineering job. The result? About 87% of engineers in the U.S. are men.
While it’s easy to blame that attrition on other oft-cited reasons women leave the workforce (i.e. having children), a group of researchers who conducted a longitudinal study of engineering students during college and five years afterwards found that many women leave the industry for one simple reason: sexism. The research, which began in 2003, relied on a combination of students’ surveys, interviews, and monthly diaries.
Susan Silbey, a sociology and anthropology professor at MIT’s Sloan School of Management and one of the study’s lead researchers, outlined the findings in Harvard Business Review.
Female engineers’ first substantive experiences with sexism occurred in school, with many women describing being treated differently by professors and classmates. Female students describe being “relegated to doing routine managerial and secretarial jobs” when working on group projects and being “excluded from the ‘real’ engineering work” by their male peers, writes Silbey.
Subscribe to the Broadsheet, Fortune’s daily newsletter on the world’s most powerful women.
Upon entering the workforce, women had similar—if not more negative—encounters with sexism. Silbey summarizes the experiences of men and women who participated in the study as follows:
Men were assigned interesting problem-solving tasks where they could develop their analytic and technical skills, while women were often assigned jobs sorting papers, copying, collecting equipment, writing notes, and coordinating—tasks they felt did not value or cultivate their skills.
“Being a manager is okay, but that’s not why they became engineers,” Silbey tells Fortune of the women who participated in the study. “They like to tinker, same as the men do.” Over time, constantly being given managerial tasks erodes women’s confidence and makes them question why they became engineers in the first place.
One way to stop women from being relegated to these roles, says Silbey, is for professors and higher-level managers to assign specific jobs to each member of a project team, making sure that female students are given a chance to hone their technical skills.
Female study participants also described work experiences that will sound familiar to women in other industries: being talked down to by older, male superiors and having colleagues make comments about their appearances.