Uncoupling of biological nitrogen fixation from ammonia assimilation is a prerequisite step for engineering ammonia excretion and improvement of plant-associative nitrogen fixation. In this study, we have identified an amino acid substitution in glutamine synthetase, which provides temperature sensitive biosynthesis of glutamine, the intracellular metabolic signal of the nitrogen status. As a consequence, negative feedback regulation of genes and enzymes subject to nitrogen regulation, including nitrogenase is thermally controlled, enabling ammonia excretion in engineered Escherichia coli and the plant-associated diazotroph Klebsiella oxytoca at 23?°C, but not at 30?°C. We demonstrate that this temperature profile can be exploited to provide diurnal oscillation of ammonia excretion when variant bacteria are used to inoculate cereal crops. We provide evidence that diurnal temperature variation improves nitrogen donation to the plant because the inoculant bacteria have the ability to recover and proliferate at higher temperatures during the daytime.