We consider an advancing contact line traveling over a region of locally modified wetting or thermal substrate properties. A lubrication-type model is developed to account for coupling of viscous flow, evaporation, surface tension, and disjoining pressure. Stick-slip-type behavior is found for a range of conditions as the contact line passes over the defect and explained by a temporary increase in the local stresses disrupting the liquid supply into the contact line region. A simple estimate of the degree of contact line slowdown is obtained and compared with the numerical simulation results. Tangential stresses arising from the action of the electric field on the interfacial changes are accounted for in our model; neglecting them would lead to an overprediction of the time of interaction between the contact line and the defect. Increasing the substrate temperature uniformly has little effect on contact line motion, but local increase of the temperature enhances the tendency of the contact line to be pulled back by the defect, an effect explained by the Marangoni stresses.