The ventricles then repolarize giving rise to the T-wave on the ECG.
Note this sequence of events occurs in less than 1 second!