The ultrafast dynamics of the antiferrodistortive phase transition in perovskite SrTiO3 is monitored via time-domain Brillouin scattering. Using femtosecond optical pulses, we initiate a thermally driven tetragonal-to-cubic structural transformation and detect the crystal phase through changes in the frequency of Brillouin oscillations (BO) induced by propagating acoustic phonons. Coupling the measured BO frequency with a spatiotemporal heat diffusion model, we demonstrate that, for a sample kept in the tetragonal phase, deposition of sufficient thermal energy induces a rapid transformation of the heat-affected region to the cubic phase. The initial phase change is followed by a slower reverse cubic-to-tetragonal phase transformation occurring on a timescale of hundreds of picoseconds. We attribute this ultrafast phase transformation in the perovskite to a structural resemblance between atomic displacements of the R-point soft optic mode of the cubic phase and the tetragonal phase, both characterized by anti-phase rotation of oxygen octahedra. The structural relaxation time exhibits a strong temperature dependence consistent with the prediction of the equation of motion describing collective oxygen octahedra rotation based on the energy landscape of the phenomenological Landau theory of phase transitions. Evidence of such a fast structural transition in perovskites can open up new avenues in information processing and energy storage sectors.