We analyze the energy balance in the lower transition region by constructing theoretical models which satisfy the energy balance constraint. The energy balance is achieved by balancing the radiative losses and the energy flowing downward from the corona. This energy flow is mainly in two forms: conductive heat flow, and hydrogen ionization energy flow due to ambipolar diffusion. We assume hydrostatic equilibrium and, in a first calculation, ignore local mechanical heating. We also ignore Joule heating. In a second model we introduce some mechanical heating compatible with chromospheric energy-balance calculations. The models are computed for a partial non-LTE approach in which radiation departs strongly from LTE but particles depart from Maxwellian distributions only to first order. The definitions and values of the transport coefficients are taken from consistent first-order particle transport equations. Our results here apply to cases where the magnetic field is either absent, or uniform and vertical. Our equations include mass velocity terms, but we consider only the hydrostatic case in the numerical results presented in this paper. The radiative losses are mainly due to hydrogen, although optically thin losses due to other elements have also been included. The hydrogen statistical equilibrium equations for excitation and ionization were solved simultaneously with the radiative transfer equations in all transitions for a model atom with four bound levels; these statistical equilibrium equations include ambipolar diffusion. Ambipolar diffusion turns out to be of great importance in determining the hydrogen ionization in the lower transition region. The results are compared with the observed Lyman lines and continuum from the average quiet Sun. The approximate agreement suggests that this type of model can roughly explain the observed intensities in a physically meaningful way, assuming only a few free parameters specified as chromospheric boundary conditions. The temperature as a function of depth does not have the 20,000 K plateau needed in semiempirical models without ambipolar diffusion. Also, the temperature does not have the very steep gradient of some previous theoretical calculations that consider only the fully ionized plasma conductivity. Thus we find that highly nonthermal electrons have a much smaller effect than the transfer of ionization energy by ambipolar diffusion.