In this paper a quasi-variational formulation for the creeping flow of a lubricant between deformable surfaces is derived on the basis of a principle of virtual power. This physical principle states that the state of the lubricated system is such that any change of the deformation or of the flow increases the total power. The principle correctly produces the governing differential equations and boundary conditions. Performing the usual approximations that are based on the scaling of the problem directly into the power functional (and not into the differential expressions), an approximate variational formulation is obtained that contains only quantities for and at the deformed surface. In deriving the differential equations and boundary conditions from this approximate functional it is noted that the usual formulation is obtained provided the sliding speed of the surfaces vanishes at the cavitation boundary. When restricted to hydrodynamic lubrication, a true variational principle results; the functional correctly produces the Reynolds equation, but differs from the functional that is commonly derived solely from this equation. The quasi-variational formulation that is derived for EHL gives an alternative way to formulate finite element approximations. Furthermore it specifies the relevance of the contribution of centrifugal forces on the deformation.