We show that the restricted Lie algebra structure on Hochschild cohomology is invariant under stable equivalences of Morita type between selfinjective algebras. Thereby we obtain a number of positive characteristic stable invariants, such as the p-toral rank of HH 1 (A, A). We also prove a more general result concerning Iwanaga Gorenstein algebras, using a more general notion of stable equivalences of Morita type. We provide several applications to commutative algebra and modular representation theory. The proof exploits in an essential way the B∞-structure of the Hochschild cochain complex.In the appendix we explain how the well-definedness of the p-power operation on Hochschild cohomology follows from some (originally topological) results of May and Cohen, and (on the algebraic side) Turchin. We give complete proofs, using the language of operads.