Coral reefs experience phase shifts from coral- to algae-dominated benthic communities, which could affect the interplay between processes introducing and removing bioavailable nitrogen. However, the magnitude of such processes, i.e., dinitrogen (N2) fixation and denitrification levels, and their responses to phase shifts remain unknown in coral reefs. We assessed both processes for the dominant species of six benthic categories (hard corals, soft corals, turf algae, coral rubble, biogenic rock, and reef sands) accounting for > 98% of the benthic cover of a central Red Sea coral reef. Rates were extrapolated to the relative benthic cover of the studied organisms in co-occurring coral- and algae-dominated areas of the same reef. In general, benthic categories with high N2 fixation exhibited low denitrification activity. Extrapolated to the respective reef area, turf algae and coral rubble accounted for > 90% of overall N2 fixation, whereas corals contributed to more than half of reef denitrification. Total N2 fixation was twice as high in algae- compared to coral-dominated areas, whereas denitrification levels were similar. We conclude that algae-dominated reefs promote new nitrogen input through enhanced N2 fixation and comparatively low denitrification. The subsequent increased nitrogen availability could support net productivity, resulting in a positive feedback loop that increases the competitive advantage of algae over corals in reefs that experienced a phase shift.