Self-assembled monolayers (SAMs) of alkylthiols with polar terminal groups on gold may be photopatterned to produce structures that are stable against displacement by methyl-terminated thiols with longer alkyl chains. For example, 3-mercaptopropanoic acid (MPA) patterns are not eroded by octadecanethiol (ODT). However, photopatterned SAMs of methyl-terminated thiols shorter than tetradecanethiol are eroded by exposure to solutions of thiols with polar terminal groups. For example, dodecanethiol (DDT) patterns are eroded by MPA. The erosion process commences at boundaries between masked and unmasked regions of the sample and continues rapidly to completion. At locations remote from such boundaries, the alkyl chains of the adsorbate molecules provide a steric barrier that protects the headgroup from attack by molecules in solution, However, at boundary regions, there is a breakdown in this steric protection that facilitates displacement of nonpolar adsorbates by molecules with hydrogen-bonding terminal groups, leading to the thermodynamically favored product. Formation of a complete monolayer in oxidized regions (by displacement of alkylsulfonates) halts the displacement process. The well-attested stability of SAMs under extreme conditions mag be attributed to a conjunction of S-Au interactions with steric effects and intermolecular interactions. However, it is postulated that the significance of the latter two factors is somewhat greater than has often been thought previously. It is concluded that hydrogen bonding contributes greatly to the stabilities of SAMs formed from molecules with polar terminal groups.