The ability to modify the stacking sequence of ultrathin films offers a unique way to change either the interaction strength or the doping, but demands a careful control of each atomic monolayer. Progress is hampered by the lack of a direct method that allows differentiation on a local scale between the various terminating layers of a crystal. Here, the combination of a vacuum annealing process and friction force microscopy reveals this local distinction on a SrTiO3 surface. Using the friction contrast, we find how the terminating layer of a single crystal profoundly influences the terrace edge structure. (C) 1998 American Institute of Physics. [S0003-6951(98)01914-7].