Surface microstructures in nature enable diverse and intriguing properties, from the iridescence of butterfly wings to the hydrophobicity of lotus leaves to the controllable adhesion of gecko toes. Many artificial analogues exist; however, there is a key characteristic of the natural materials that is largely absent from the synthetic versions-spatial variation. Here we show that exploiting spatial variation in the design of one class of synthetic microstructure, gecko-inspired adhesives, enables one-way friction, an intriguing property of natural gecko adhesive. When loaded along a surface in the preferred direction, our adhesive material supports forces 100 times larger than when loaded in the reverse direction, representing an asymmetry significantly larger than demonstrated in spatially uniform adhesives. Our study suggests that spatial variation has the potential to advance artificial microstructures, helping to close the gap between synthetic and natural materials.