We study the stability with respect to a broad class of perturbations of gapped ground-state phases of quantum spin systems defined by frustration-free Hamiltonians. The core result of this work is a proof using the Bravyi–Hastings–Michalakis (BHM) strategy that under a condition of local topological quantum order (LTQO), the bulk gap is stable under perturbations that decay at long distances faster than a stretched exponential. Compared to previous work, we expand the class of frustration-free quantum spin models that can be handled to include models with more general boundary conditions, and models with discrete symmetry breaking. Detailed estimates allow us to formulate sufficient conditions for the validity of positive lower bounds for the gap that are uniform in the system size and that are explicit to some degree. We provide a survey of the BHM strategy following the approach of Michalakis and Zwolak, with alterations introduced to accommodate more general than just periodic boundary conditions and more general lattices. We express the fundamental condition known as LTQO by means of an indistinguishability radius, which we introduce. Using the uniform finite-volume results, we then proceed to study the thermodynamic limit. We first study the case of a unique limiting ground state and then also consider models with spontaneous breaking of a discrete symmetry. In the latter case, LTQO cannot hold for all local observables. However, for perturbations that preserve the symmetry, we show stability of the gap and the structure of the broken symmetry phases. We prove that the GNS Hamiltonian associated with each pure state has a non-zero spectral gap above the ground state.