Andre Heidari kicked a 47-yard field goal with 19 seconds to play, and Southern California's stalwart defense repeatedly came up big in a 20-17 victory over No. 4 Stanford on Saturday night.