A granular or particulate composition of matter that includes algae and bacteria is described. The algal-sludge granules are generated by incubating a wastewater system with algae under specific quiescent conditions with illumination. Once the algal-sludge granules are present, it is no longer necessary to maintain quiescent conditions, and reaction with wastewater under stirred conditions is possible. The methods described include ab initio generation of the algal-sludge granules, use of the algal-sludge granules to remediate wastewater, and use of the algal-sludge granules to generate biomass. It is believed that the remediation of wastewater by algal-sludge granules will save the energy for wastewater treatment, recover the energy in wastewater in the form of biomass, and reduce the wastewater treatment carbon footprint.