Abstract In situ transmission electron microscopy based nanopillar compression is utilized to investigate the mechanical properties of zinc dialkyldithiophosphate (ZDDP) tribological films. Small scale testing provides localized insights into the properties of ZDDP films that spatially vary in composition at the nanoscale. Large variations in yield strength, between 0.82 and 4.8 GPa, are measured and correlated with local chemistry changes. Lower density regions of the film that tend to be carbon-rich have lower yield stresses, than higher density regions that tend to be zinc-, iron-, and sulfur-rich. It is hypothesized that the strong compositional dependence in mechanical properties at the nanoscale is an important factor contributing to the efficacy of ZDDP as an antiwear tribological film.