Cyanobacteria contain a bidirectional [NiFe] hydrogenase which transiently produces hydrogen upon exposure of anoxic cells to light, potentially acting as a ?valve? releasing excess electrons from the electron transport chain. However, its interaction with the photosynthetic electron transport chain remains unclear. By GFP-tagging the HoxF diaphorase subunit we show that the hydrogenase is thylakoid associated, comprising a population dispersed uniformly through the thylakoids and a subpopulation localized to discrete puncta in the distal thylakoid. Thylakoid localisation of both the HoxH and HoxY hydrogenase subunits is confirmed by immunogold electron microscopy. The diaphorase HoxE subunit is essential for recruitment to the dispersed thylakoid population, potentially anchoring the hydrogenase to the membrane, but aggregation to puncta occurs through a distinct HoxE-independent mechanism. Membrane association does not require NDH-1. Localization is dynamic on a scale of minutes, with anoxia and high light inducing a significant redistribution between these populations in favour of puncta. Lastly, since HoxE is essential for access to its electron donor, electron supply to the hydrogenase depends on a physiologically controlled localization, potentially offering a new avenue to enhance photosynthetic hydrogen production by exploiting localization/aggregation signals.