The final assembly of terrestrial planets occurs via massive collisions, which can launch copious clouds of dust that are warmed by the star and glow in the infrared. We report the real-time detection of a debris-producing impact in the terrestrial planet zone around a 35-million year-old solar analog star. We observed a substantial brightening of the debris disk at 3-5 {mu}m, followed by a decay over a year, with quasi-periodic modulations of the disk flux. The behavior is consistent with the occurrence of a violent impact that produced vapor out of which a thick cloud of silicate spherules condensed that were ground into dust by collisions. These results demonstrate how the time domain can become a new dimension for the study of terrestrial planet formation.