Gender differences in competition have been demonstrated in a variety of contexts, yet it remains unclear how people respond to competitors they perceive to be hard or easy, and whether gender differences exist in this response. I run an experiment in eighteen public high school classrooms to study the effect of competing in a math task against different levels of competitors. I exploit natural sorting within grade levels in Malaysian public schools to randomly assign competitors of different perceived difficulty levels. Using a standard competition measure, males are significantly more competitive than females. However, when students face harder competitors, males respond by lowering performance while the performance of females does not vary significantly by level of competition.