Two lab-scale aerobic granular sludge sequencing batch reactors were operated at 20 and 30°C and compared for phosphorus (P) removal efficiency and microbial community composition. P-removal efficiency was higher at 20°C (>90%) than at 30°C (60%) when the sludge retention time (SRT) was controlled at 30 days by removing excess sludge equally throughout the sludge bed. Samples analyzed by fluorescent in situ hybridization (FISH) indicated a segregation of biomass over the sludge bed: in the upper part, Candidatus Competibacter phosphatis (glycogen-accumulating organisms—GAOs) were dominant while in the bottom, Candidatus Accumulibacter phosphatis (polyphosphate-accumulating organisms—PAOs) dominated. In order to favour PAOs over GAOs and hence improve P-removal at 30°C, the SRT was controlled by discharging biomass mainly from the top of the sludge bed (80% of the excess sludge), while bottom granules were removed in minor proportions (20% of the excess sludge). With the selective sludge removal proposed, 100% P-removal efficiency was obtained in the reactor operated at 30°C. In the meantime, the biomass in the 30°C reactor changed in color from brownish-black to white. Big white granules appeared in this system and were completely dominated by PAOs (more than 90% of the microbial population), showing relatively high ash content compared to other granules. In the reactor operated at 20°C, P-removal efficiency remained stable above 90% regardless of the sludge removal procedure for SRT control. The results obtained in this study stress the importance of sludge discharge mainly from the top as well as in minor proportions from the bottom of the sludge bed to control the SRT in order to prevent significant growth of GAOs and remove enough accumulated P from the system, particularly at high temperatures (e.g., 30°C). Biotechnol. Bioeng. 2012; 109:1919–1928. © 2012 Wiley Periodicals, Inc.