Analysis of the excitation of atmospheric gravity waves leads to a hypothesis concerning the nature of medium-scale traveling ionospheric disturbances (TID's) and their relation to large-scale TID's. Stationary phase techniques are used to derive the asymptotic fluctuations of velocity and electron density generated by a line source (e.g., the auroral electrojet). Dissipation by viscosity and thermal conductivity is included in an approximate manner. The gravity wave response includes a discrete spectrum of upper-atmospheric guided modes and a continuous spectrum of freely propagating waves; these two classes of waves can be associated with large-scale and medium-scale TID's, respectively. The medium-scale TID's, in turn, are primarily composed of two families of waves: those that propagate obliquely upward from the source and reach the F region directly and those that propagate initially downward and reach the F region only after reflection from the earth. For an E region source the earth-reflected waves appear as nearly monochromatic wave packets, whereas the direct waves appear for the most part as single pulses; this qualitative difference corresponds to J. E. Titheridge's observational distinction between periodic and nonperiodic TID's. It is suggested that this dichotomy may imply the dominance of upper-atmospheric (as opposed to tropospheric) sources. In this connection the average fluctuations of the auroral electrojet are shown to be sufficient to generate sizable medium-scale TID's that propagate to large horizontal distances with no loss of amplitude despite the absence of ducting mechanisms. Such propagation is possible because amplitude attenuation due to cylindrical spreading is counteracted by the fact that the lower-frequency waves, which reach the F region at the greater horizontal distances, are generated with larger amplitudes. Several properties of the calculated response, including the linear increase of period and wavelength with distance from the source, might be useful in future observational studies designed to identify the sources of medium-scale TID's.