This paper considers the effects of substrate inhomogeneity on the motion of the three phase contact line. The model employed assumes the slowness of the contact line in comparison to capillary relaxation. The homogenization of this free boundary problem with a spatially periodic velocity law is considered. Formal multiple scales analysis yields a local, periodic problem whose time-averaged dynamics corresponds to the homogenized front velocity. A rigorous understanding of the long time dynamics is developed using comparison techniques. Computations employing boundary integral equations are used to illustrate the consequences of the analysis. Advancing and receding contact angles, pinning and anisotropic motion can be predicted within this framework.In many realistic circumstances, the static and dynamic wetting properties of liquids are substantially influenced by imperfections in the solid surface. Heterogeneities result in contact lines with a fine scale structure that may lead to pinning of the evolving front and hysteresis of the overall fluid shape.Understanding the role that surface imperfections play is part of larger theoretical effort to determine the macroscopic manifestations of microscopic contact line features [4,15,42]. Classical fluid mechanics is by itself insufficient to describe the moving contact line [32], and the additional physical ingredients needed are still controversial. Modeling and theoretical studies include notions of slip boundary conditions [28,30], continuum models [15,45,51], rheological modifications [27,53], and atomistic simulations [19,29] (see [4,42] for more extensive accounts). There is also considerable technological importance in understanding the role of wetting on patterned substrates [11,17,37,48].The model studied here is based on the slowness of the contact line in comparison to the time for capillary relaxation, known as the quasistatic limit. This represents possibly the simplest nontrivial global model for contact line motion, and therefore provides a good point of departure for examining surface heterogeneity. In this limiting case, the fluid pressure is constant, and the fluid's geometry can therefore be described as a "capillary" surface. Motion arises from an imbalance of surface forces at the contact line itself, which can be modeled by a constitutive velocity-contact angle law. This approximation has been utilized in many previous studies [2, 21-23, 28, 31, 33, 40, 43].The static effects of surface heterogeneity have been studied for some time. Early heuristic theories considered the averaged effect of rough surfaces and chemical heterogeneities on the equilibrium contact angle [7,54]. These laws have known limits of applicability, however ([4, Chapter 9], [3]). More recent studies have considered this problem from the point of view of mechanics [4,34], statistics [14,41], and gamma convergence techniques [1].In the dynamic case, much less is understood. Flows over heterogeneous surfaces have been studied experimentally [11,12,38,39,47] and computationall...