From 1911 he studied variable stars, distinguishing Cepheid variables from eclipsing binaries and correctly ascribing their variability to pulsations. He subsequently discovered Cepheids in globular clusters, whose distances and distribution he was able to estimate using the period–luminosity law discovered by H. S. Leavitt and a statistical method he devised. His results showed that the Galaxy was much larger than had been supposed (although Shapley initially overestimated its size), with the Sun some way from the centre. He originally sided with the Dutch-American astronomer Adriaan van Maanen (1884–1946) in believing that what were then known as ’spiral nebulae’ were relatively small and nearby. In 1920 Shapley propounded this view in the so-called Great Debate with the American astronomer Heber Doust Curtis (1872–1942), who argued (correctly) that spiral nebulae were separate galaxies. The 1932 Shapley–Ames catalogue of 1249 galaxies, compiled with his assistant Adelaide Ames (1900–32), revealed the irregular distribution of galaxies and the existence of clusters of galaxies.