Core plug and field tests have shown that significantly more oil can be produced from sandstone reservoirs when the water that is injected to maintain pressure in the reservoir has lower salinity than regular seawater. We investigated the adhesion between functional groups known to dominate in crude oil and grains from reservoir sandstone as a function of pH and salinity. We used atomic force microscopy (AFM) in chemical force mapping mode, and we functionalized the AFM tips both with −CH 3 , to model adhesion of hydrophobic molecules, and with −COO(H), to model polar compounds. As the pH increased, the adhesion force decreased. The behavior was similar for the two types of tips, but adhesion was higher for the polar tip. The average adhesion at pH 4.5 for the −COO(H) tip in artificial seawater (ASW) was close to 300 pN, and 200 pN in ASW diluted by a factor of 20. For the −CH 3 tip, adhesion was ∼200 pN in high salinity and 140 pN in low salinity. Regardless of the salinity, adhesion decreased as pH increased. To gain understanding about the controlling processes, we examined our data in light of the Dejarguin−Landau−Verwey−Overbeek (DLVO) theory and the Henderson−Hasselbalch expression. The commonly used form of the DLVO relationship could not account for the pH dependence. It predicts adhesion to be independent of pH in high-salinity solution and strongly dependent on pH in low salinity, opposite to the experimental evidence. Although DLVO theory cannot be expected to quantitatively represent real systems, it is unlikely that DLVO would predict reversed behavior. Our results indicate that the extended double layer, which is one of the prevailing explanations for the low salinity effect, is not the full explanation. Decrease in surface charge density at low salinity plays an important role. The change in adhesion as pH increases above 5.5, which is the typical pH of sandstone reservoirs, to the neutral range could enhance oil recovery. This is probably a factor in the effectiveness of alkaline flooding and might be an inherent factor in the production that results from flooding with seawater, which is typically pH 8.3. However, the buffering effect in sandstone reservoirs, which maintains pH at ∼5.5, suggests that benefits from controlling pH for EOR could be marginal.