Fine grained Pb or Pb-alloy films may be produced by the use of barriers to grain growth deposited between Pb layers. We have studied the mechanism of reducing grain growth and the kinetics of barrier formation for AuIn2 barriers with the aid of nuclear backscattering spectroscopy and transmission electron microscopy on films incorporating various deposition sequences. We find that compounds which form in situ are barriers to grain growth during vapor deposition only if one of their constituents is a fast diffusing species such as Au in Pb and if the fast diffusing species is placed underneath each Pb layer. The Au diffuses into the fast moving Pb grain boundaries, imparting a drag on them. Upon depositing In on top of the Pb grains the In forms AuIn2 with the Au in the grain boundaries. The continuous network of AuIn2 then prevents further grain boundary motion.