Tertiary modes in electrostatic drift-wave turbulence are localized near extrema of the zonal velocity U (x) with respect to the radial coordinate x. We argue that these modes can be described as quantum harmonic oscillators with complex frequencies, so their spectrum can be readily calculated. The corresponding growth rate γTI is derived within the modified Hasegawa-Wakatani model. We show that γTI equals the primary-instability growth rate plus a term that depends on the local U ; hence, the instability threshold is shifted compared to that in homogeneous turbulence. This provides a generic explanation of the well-known yet elusive Dimits shift, which we find explicitly in the Terry-Horton limit. Linearly unstable tertiary modes either saturate due to the evolution of the zonal density or generate radially propagating structures when the shear |U | is sufficiently weakened by viscosity. The Dimits regime ends when such structures are generated continuously.Drift-wave (DW) turbulence plays a significant role in fusion plasmas and can develop from various "primary" instabilities [1][2][3][4][5][6][7]. However, having their linear growth rate γ PI above zero is not enough to make plasma turbulent, because the "secondary" instability can suppress turbulence by generating zonal flows (ZFs) [5][6][7][8][9][10][11][12]; hence, the threshold for the onset of turbulence is modified compared to the linear theory. This constitutes the so-called Dimits shift [12][13][14][15][16][17], which has been attracting attention for two decades. The finite value of the Dimits shift is commonly attributed to the "tertiary" instability (TI) [5], and some theories of the TI have been proposed [5,[15][16][17][18][19][20]. However, basic understanding and generic description of the TI and the Dimits shift have been elusive.Here, we propose a simple yet quantitative theory of the TI using the modified Hasegawa-Wakatani equation (mHWE) [2,16] as a base turbulence model. We clarify several misconceptions regarding the TI, and we explicitly derive the Dimits shift in the limit corresponding to the Terry-Horton model [15,21]. Our approach is also applicable to other DW models, such as ion-temperaturegradient (ITG) turbulence [5], as discussed towards the end. Furthermore, we explain TI's role in two types of predator-prey (PP) oscillations, in determining the characteristic ZF scale in the Dimits regime, and in transition to the turbulent state.Model equations.-The mHWE [2, 16] is a slab model of two-dimensional electrostatic turbulence with a uniform magnetic field B = Bẑ. Turbulence is considered on the plane (x, y), where x is the radial coordinate and y is the poloidal coordinate. The model describes ϕ and n, which are fluctuations of the electric potential and density, respectively. Ions are assumed cold while electrons have finite temperature T e . The plasma is assumed to have an equilibrium density profile n 0 (x) parameterized by a constant κ . = a/L n , where a is the system length and L n . = (−n 0 /n 0 ) −1 . (We use . = to denote...