The aim of our study was to understand the role of the nematode community in a cyanobacterial-dominated biofilm located in the river Llobregat, NE Spain. This biofilm was mainly composed of oscillatorial species and diatoms. Fractions of these mats can become detached from the substrata and become free-floating, dispersing downstream and acquiring different structural and physiological properties. Both cyanobacterial biofilms, attached and free-floating, were compared with another benthic biofilm that occurred in the reach of the river that was studied. The nematode diversity was restricted, and was dominated by Chromadorita leuckarti, Diplogaster rivalis, Plectus parvus, Neotobrilus diversipapillatus, Monhystera spp., Dorylaimus sp. and Mononchus sp. Nematode density and biomass were significantly greater in the free-floating biofilm (maximum values of 752 ind/cm2 and 171.3 μgC/cm2). Different trophic and sexual strategies were observed. The free-floating biofilm showed higher abundances of juveniles and a high proportion of gravid females. A positive correlation was observed between cyanobacterial density and the abundance of juveniles or adults of the commonest nematode species, indicating their potential as food resources.