Numerical simulation and laboratory experiments were conducted to investigate the determining factor and the underlying mechanism in aerobic sludge granulation in a sequencing batch reactor (SBR). In the numerical simulation, a sectional approach was used to develop a model to describe the biomass dynamics during the granulation process. The growth of different classes of the SBR sludge with different substrate uptake rates and different sludge discharge ratios was simulated. The results indicate that the selective discharge of slow-settling sludge flocs is the key determining factor for granulation. In the laboratory study, experiments were conducted with two identical 2.4-L SBRs, R1 and R2, using different sludge discharge methods - the selective discharge of slow-settling sludge flocs for R1, and mixed, unselective sludge discharge for R2. The SBRs were fed with glucose-based synthetic wastewater at a chemical oxygen demand (COD) loading rate of 1.5 kg/m(3)-d. The evolution of the microbial community during the experimental process was monitored using the molecular techniques of polymerase chain reaction (PCR), denaturing gradient gel electrophoresis (DGGE) and clone library analysis. Sludge granulation was achieved in less than three weeks in R1, whereas the sludge in R2 remained in the form of flocs. However, some bacterial species had a significant presence in both the R1 granules and the R2 flocs. The results suggest that aerobic granulation may not require the dominance of any particular species. Small and loose sludge flocs were found to have an advantage over larger and dense granules in substrate uptake. Thus, discharge of loose flocs would remove these competitors from the system and makes the substrate more available for uptake and utilisation by biomass in the attached-growth form, resulting in sludge granulation.