The effect of solid-liquid interfacial energy on the long-range attraction between self-assembled thiolate monolayers in water has been studied by direct force measurements. The solid-liquid interfacial energy was tuned by changing the properties of the solid surface: the thiolate monolayers were prepared by self-assembly of mixtures of methyl- and hydroxyl- functionalized alkylthiols onto thin gold films. The wetting properties were examined by contact angle measurements with the Wilhelmy plate method. Our results show that the shape of the long-ranged attractive force is sensitive to the advancing solid-liquid contact angle: whenever it exceeds 90° the force profiles are discontinuous and contains steps, whereas no attraction beyond the van der Waals force is observed for contact angles lower than 90°. We attribute the steps in the long-range attraction between hydrophobic surfaces to bridging of microscopic bubbles residing on the surfaces, and we conclude that the stability of these bubbles are related to macroscopic contact angles.