Background: Internalizing and externalizing problem behavior at school can have major consequences for a child and is predictive for disorders later in life. Teacher ratings are important to assess internalizing and externalizing problems at school. Genetic epidemiological studies on teacher-rated problem behavior are relatively scarce and the reported heritability estimates differ widely. A unique feature of teacher ratings of twins is that some pairs are rated by different and others are rated by the same teacher. This offers the opportunity to assess gene-environment interaction. Methods: Teacher ratings of 3,502 7-year-old, 3,134 10-year-old and 2,193 12-year-old twin pairs were analyzed with structural equation modeling. About 60% of the twin pairs were rated by the same teacher. Twin correlations and the heritability of internalizing and externalizing behavior were estimated, separately for pairs rated by the same and different teachers. Socioeconomic status and externalizing behavior at age 3 were included as covariates. Results: Twin correlations and heritability estimates were higher when twin pairs were in the same class and rated by the same teacher than when pairs were rated by different teachers. These differences could not be explained by twin confusion or rater bias. When twins were rated by the same teacher, heritability estimates were about 70% for internalizing problems and around 80% in boys and 70% in girls for externalizing problems. When twins were rated by different teachers, heritability estimates for internalizing problems were around 30% and for externalizing problems around 50%. Conclusions: Exposure to different teachers during childhood may affect the heritability of internalizing and externalizing behavior at school. This finding points to gene-environment interaction and is important for the understanding of childhood problem behavior. In addition, it could imply an opportunity for interventions at school. © 2012 Association for Child and Adolescent Mental Health.