Separation by settling is one of the most troublesome stages of an activated sludge process. A decrease in the efficiency of separation of microbial biomass from the treated effluent causes a decrease in the overall efficiency of the treatment plant. One of the most common problems in activated sludge systems to negatively influence the settleability is sludge bulking which can be defined as non-settling situation of microbial mass. The main objective of this study is to find out the effect of phosphorus deficiency on bulking of activated sludge. In order to achieve this aim, the effects of a strictly phosphorus limited environment was investigated by running 6 semi-continuous activated sludge reactors. Since the specific aim of the study is to identify the effects of magnesium and calcium ions on sludge bulking in a phosphorus deficient medium, 3 different magnesium and calcium concentrations (5, 10, 20 meq l(-1)) were studied. Laboratory scale reactors were fed with synthetic wastewater and operated at a sludge age of 8 days. Results showed that, phosphorus deficiency caused sludge bulking. Sludge samples examined under microscope showed that the floc structures from reactors fed with different cations are significantly different. To identify the differences, a series of chemical analyses were conducted on the sludge samples. In addition to that, sludge volume index (SVI) values were monitored on a daily basis. Next, the concentration of phosphorus in the feed medium was increased in two separate steps and the possibility to cure the sludge bulking problem was investigated. It was found that bulking of activated sludges due to phosphorus deficiency could be cured by the addition of phosphorus. For phosphorus deficient bulking in relation to the cations present in the system some mechanisms are suggested.