Nitrogen loads in coastal areas have increased dramatically, with detrimental consequences for coastal ecosystems. Shallow sediments and seagrass meadows are hotspots for denitrification, favoring N loss. However, atmospheric dinitrogen (N2) fixation has been reported to support seagrass growth. Therefore, the role of coastal marine systems dominated by seagrasses in the net N2 flux remains unclear. Here, we measured denitrification, anaerobic ammonium oxidation (anammox), and N2 fixation in a tropical seagrass (Enhalus acoroides) meadow and the adjacent bare sediment in a coastal lagoon in the central Red Sea. We detected high annual mean rates of denitrification (34.9±10.3 and 31.6±8.9 mg N m−2 d−1) and anammox (12.4±3.4 and 19.8±4.4 mg N m−2 d−1) in vegetated and bare sediments. The annual mean N loss was higher (between 8 and 63-fold) than the N2 fixed (annual mean = 5.9±0.2 and 0.8±0.3 mg N m−2 d−1) in the meadow and bare sediment, leading to a net flux of N2 from sediments to the atmosphere. Despite the importance of this coastal lagoon in removing N from the system, N2 fixation can contribute substantially to seagrass growth since N2 fixation rates found here could contribute up to 36 % of plant N requirements. In vegetated sediments, anammox rates decreased with increasing organic matter (OM) content, while N2 fixation increased with OM content. Denitrification and anammox increased linearly with temperature, while N2 fixation showed a maximum at intermediate temperatures. Therefore, the forecasted warming could further increase the N2 flux from sediments to the atmosphere, potentially impacting seagrass productivity and their capacity to mitigate climate change but also enhancing their potential N removal.