Biological N2 fixation, the reduction of dinitrogen (N2) gas to biologically available nitrogen, is a fundamental process since it represents a source of new nitrogen for marine life in areas where this important element can be limiting, supporting primary productivity and thus biological carbon export to the deep ocean. This process is performed by the nitrogen-fixing prokaryotic microorganisms (the so-called diazotrophs). However, very little is still known about the identity and ecology of diazotrophs, which largely limits our capacity to understand the global significance of this process, and to predict potential variations in nitrogen fixation upon changes in environmental conditions. In this thesis, we aimed at improving the knowledge on the diversity, ecology and evolution of the marine nitrogen-fixing microorganisms in the open ocean.