Sexual harassment or the unwanted offensive behaviours that women and girls experience is a pervasive global challenge. Yet, there is limited evidence on the lived experiences of sexual harassment from school-based settings in sub-Saharan Africa. We explore students' perceived experiences, perpetration, and drivers of sexual harassment in schools in Mwanza, Tanzania. This study employed a qualitative research design involving 30 in-depth interviews and seven focus group discussions with 30 male and 40 female secondary school pupils aged 13-19 years. Data was analysed using a thematic approach. The findings show that experiences of sexual harassment among schoolgirls were widespread. Common forms of harassment were verbal and non-verbal gestures of a sexual nature. The desire to prove one's masculinity and peer pressure were key drivers of perpetration among schoolboys. Teachers took advantage of their positions of authority to sexually harass female pupils and employed corporal punishment to those who resisted their advances. Sexual harassment had multiple negative outcomes, including schoolgirls dropping out of school and mental health issues, such as anxiety, stress and poor academic performance. Girls rarely reported sexual harassment for fear of further victimisation and stigma from others. Sexual harassment of girls is common in secondary schools in Mwanza and is mainly driven by peer pressure and the desire to prove one's masculinity. Given its harmful effects, there is a need to implement clear policies to protect girls, support confidential disclosure and reporting and to address toxic masculinity norms among young men.