Cyanobacteria have been found to be important for primary production and nitrogen supply on coral reefs. Here, the distribution of cyanobacteria that dominate microbial mats (identified by using microscopic and molecular tools), their abundance, and specific contributions and timing of N 2 fixation, were studied in two coral reef systems of the western Indian Ocean: Mayotte (Comoros) and Tulear (Toliara, Madagascar). The results were compared with previously published data from the reefs of La Re´union Island (Mascarenes). Variations in nutrient levels, temperature and light penetration (Secchi) were also measured and compared. The reefs in Mayotte are situated in oligotrophic ocean waters and support coral reefs in good condition. The reef of Tulear was overgrown by algae. The shallow lagoon and reef in La Re´union showed signs of eutrophication and coral degradation. All three reefs maintained a diverse population of benthic cyanobacterial mats. A total of 13 different cyanobacterial morphotypes were encountered, belonging mainly to the genera Anabaena, Hydrocoleum, Leptolyngbya and Lyngbya (as identified by morphotypes and 16 S RNA analyses), but with variable abundances. Twelve of the 13 dominant cyanobacteria observed in the three sites fixed dinitrogen with daily rates of up to 42 nmol N 2 mg À1 Chl a.Maximum values were achieved by the heterocystous Anabaena sp. during daylight in Mayotte, which exhibited strongly lightstimulated nitrogenase activity. Mats dominated by non-heterocystous cyanobacteria fixed both during daylight and the night, with daily rates up to 38 nmol N 2 mg À1 Chl a (by Lyngbya majuscula, Mayotte). Hydrocoleum-dominated mats fixed N 2 at rates between 0 (H. glutinosum, Tulear) and 23.4 nmol N 2 mg À1 Chl a (H. coccineum, Mayotte). Cyanobacteria are normal constituents of the benthic microflora in tropical regions, but their abundance, diversity and species composition changes with environmental conditions and so do the rates of N 2 fixation on the lagoon floors.