Stereotype threat (ST), which involves confirming a negative stereotype about one's group, is a factor thought to contribute to the gender gap in science achievement and participation. This study involved a quasi-experiment in which 312 US high school physics students were randomly assigned, via their classroom cluster, to one of three ST conditions. The conditions included an explicit ST condition, an implicit ST condition, and a nullified condition. Results indicated that males in all three conditions performed similarly on a set of physics problems. Females in the nullified condition outperformed females in the explicit ST condition and females in the implicit and explicit conditions performed similarly. Males performed better than females in the implicit and explicit ST conditions, but male and female performance on the physics problems was not significantly different in the nullified condition. The implications of these findings for physics instruction and future research on gender differences in physics and ST in science are discussed.