Periodic variations of the ionosphere were detected by ground-based GPS total electron content (TEC) measurements after the Sumatra-Andaman earthquake in 2004. The observational data showed that the 4-min periodic TEC variations occurred 1 h after the earthquake and continued for longer than 4 h. At the PHKT station, about 30 cycles of the 4-min periodic TEC variations were observed from 0230 to 0430 UT. The maximum peak-to-peak amplitude of the variations was about 0.6 total electron content unit (TECU; 1 TECU = 1016 el m−2) around 0320 UT. The frequency of these periodic variations was 3.9 mHz. They were detected by the SAMP station in the northern Sumatra and the PHKT and BNKK stations in Thailand with the signal from seven GPS satellites: PRN 8, 11, 13, 19, 23, 27, and 31. They were observed in a limited area from 4°N to 15°N in latitude and from 96°E to 101°E in longitude, although the western boundary was not certain because of the limit of the observational field of view. The amplitude of these TEC variations showed the dependence on the zenith angle of the path between the GPS receiver and satellite. The amplitude had a maximum when the zenith angle was the smallest. This could be caused by the vertical structure of the electron density variations. This also suggested that the electrons were oscillating along the geomagnetic field. The 4-min periodic TEC variations were interpreted to be induced by the long-lasting free oscillation of the atmosphere set up by the earthquake. Their long duration also indicates that they were generated by a nontransient process like resonance.