We generalize and strengthen the theorem of Gromov that every compact Riemannian manifold of diameter at most D has a set of generators g1, ..., g k of length at most 2D and relators of the form gigm = gj . In particular, we obtain an explicit bound for the number k of generators in terms of the number "short loops" at every point and the number of balls required to cover a given semi-locally simply connected geodesic space. As a consequence we obtain a fundamental group finiteness theorem (new even for Riemannian manifolds) that implies the fundamental group finiteness theorems of Anderson and Shen-Wei. Our theorem requires no curvature bounds, nor lower bounds on volume or 1-systole. We use the method of discrete homotopies introduced by the first author and V. N. Berestovskii. Central to the proof is the notion of the "homotopy critical spectrum" that is closely related to the covering and length spectra. Discrete methods also allow us to strengthen and simplify the proofs of some results of Sormani-Wei about the covering spectrum.