For valve closure transients in pipelines, friction attenuates the amplitude of water hammer wave fronts and causes line packing. The latter is a sustained head increase behind the wave front. Line packing can lead to overpressure. Because of the nonlinearity of the friction term in the governing equations of water hammer, a satisfactory analytical explanation of line packing is not available. Although numerical methods can be used to compute line packing, an analytical explanation is desirable to better understand the phenomenon. This paper explains line packing analytically and presents a formula to compute the line packing that leads to the maximum pressure at the closed valve.