Electrophysiological experiments and modeling studies have shown that afterhyperpolarization regulates the discharge of lumbar motoneurons in anesthetized cats and is an important determinant of their firing properties. However, it is still unclear how firing properties depend on slow afterhyperpolarization, input conductance, and the fast currents responsible for spike generation. We study a single-compartment integrate-and-fire model with a slow potassium conductance that exponentially decays between spikes. We show that this model is analytically solvable, and we investigate how passive and active membrane properties control the discharge. We show that the model exhibits three distinct firing ranges (primary, secondary, and high frequency), and we explain the origin of these three ranges. Explicit expressions are established for the gain of the steady-state current-frequency (I-f) curve in the primary range and for the gain of the I-f curve for the first interspike interval. They show how the gain is controlled by the maximal conductance and the kinetic parameters of the afterhyperpolarization conductance. The gain also depends on the spike voltage threshold, and we compute how it is decreased by threshold accommodation (i.e., the increase of the threshold with the injected current). In contrast, the gain is not very sensitive to the input conductance. This implies that tonic synaptic activity shifts the current-frequency curve in its primary range, in agreement with experiments. Taking into account the absolute refractory period associated with spikes somewhat reduces the gain in the primary range. More importantly, it accounts for the approximately linear and steep secondary range observed in many motoneurons. In the nonphysiological high-frequency range, the behavior of the I-f curve is determined by the fast voltage-dependent currents, via the amplitude of the fast repolarization afterspike, the duration of the refractory period, and voltage threshold accommodation, if present.