We determine the structure of the fundamental group of the regular leaves of a closed singular Riemannian foliation on a compact, simply connected Riemannian manifold. We also study closed singular Riemannian foliations whose leaves are homeomorphic to aspherical or to Bieberbach manifolds. These foliations, which we call A-foliations and B-foliations, respectively, generalize isometric torus actions on Riemannian manifolds. We apply our results to the classification problem of compact, simply connected Riemannian 4- and 5-manifolds with positive or non-negative sectional curvature.