Nitrogen fixation was measured in situ for the first time by acetylene reduction for a greyish mat composed of Scytonema julianum in cave-like environments. Mat-specific rates (129.9-215.7 nmol C2 H4 m-2 s-1 for daytime fixation and 65.1-120.6 nmol C2 H4 m-2 s-1 for nighttime fixation) recorded in the Vapor cave differed considerably due to the energy reserves stored during photosynthesis being exhausted and used in the dark phase. The most influential environmental parameter for nitrogen fixation in the Vapor cave is temperature in the daytime and nighttime fixations. Nitrogen fixation by cyanobacteria may contribute considerably to the overall nitrogen cycle in harsh environments such as caves. Nitrogenase activity in Scytonema julianum was roughly 30 times higher than that of Scytonema mirabile, which also grew in cave environments, which is due to the characteristics of each site. The entrance of Vapour cave (Spain) faces SE, measures 0.75 x 0.6 m and opens to shafts of a total depth of 80 m. Its dimensions and environmental conditions (relative humidity up to 100%; maximum temperature, 43ºC) imply that it is isolated from external influences, and that the microclimate differs substantially from that experienced externally. Nitrogen fixation, photon flux density, relative humidity and temperature in the Vapor cave were taken hourly over a 24-hour period in winter.