We report time resolved measurements of second-harmonic and hard x rays emitted during the interaction of an intense laser pulse (10(16) W cm(-2), 100 fs) with a preplasma generated on a solid target. We observe that for a particular length scale the second harmonic goes through a minimum, while hard x-ray emission on the contrary maximizes. Theoretical or numerical modeling of this anticorrelation in terms of wave breaking of strongly driven electron plasma waves clearly brings out hitherto unexplored links between the physical mechanisms of second-harmonic generation and hard x-ray emission.