A previously developed mathematical wetting model is generalized and applied to the following two closely related situations: the spreading of a liquid over a prewet solid surface and the receding contact-line motion with a microscopic residual film, remaining behind the contact line. An analytical expression for the velocity dependence of the dynamic contact angle is derived. Macroscopic characteristics (the dynamic contact angle and drag force) and the flow field corresponding to the spreading of a liquid over a wet solid surface differ considerably from those calculated for a dry surface. Under certain conditions the flow in the reference frame fixed with respect to the contact line has a region with closed streamlines. The region appears due to the flow-induced Marangoni effect, the reverse influence of the surface tension gradient along the liquid-solid interface caused by the flow on the flow, which gives rise to the gradient. The results are compared qualitatively with experimental data.