We investigated the bacterial community compositions and phosphorus removal performance under sludge bulking and non-bulking conditions in two biological wastewater treatment systems (conventional A2/O (anaerobic/anoxic/aerobic) and inverted A2/O (anoxic/anaerobic/aerobic) processes) receiving the same raw wastewater. Sludge bulking resulted in significant shift in bacterial compositions from Proteobacteria dominance to Actinobacteria dominance, characterized by the significant presence of filamentous ‘Candidatus Microthrix parvicella’. Quantitative real-time polymerase chain reaction (PCR) analysis revealed that the relative abundance of ‘Candidatus Accumulibacter phosphatis’, a key polyphosphate-accumulating organism responsible for phosphorus removal, with respect to 16s rRNA genes of total bacteria was 0.8 and 0.7%, respectively, for the conventional and inverted A2/O systems when sludge bulking occurred, which increased to 8.2 and 12.3% during the non-bulking period. However, the total phosphorus removal performance during the bulking period (2-week average: 97 ± 1 and 96 ± 1%, respectively) was not adversely affected comparable to that during the non-bulking period (2-week average: 96 ± 1 and 96 ± 1%, respectively). Neisser staining revealed the presence of large polyphosphate granules in ‘Candidatus Microthrix parvicella’, suggesting that this microbial group might have been responsible for phosphorus removal during the sludge bulking period when ‘Candidatus Accumulibacter phosphatis’ was excluded from the systems.