Mycobacteria encode putative class II polyphosphate kinases (PPKs). We report that recombinant PPK2 of Mycobacterium tuberculosis catalyses the synthesis of GTP from GDP using polyphosphate rather than ATP as phosphate donor. Unlike that of PPK1, this is the favoured reaction of PPK2. The sites of autophosphorylation, H115 and H247, as well as G74 were critical for GTP-synthesizing activity. Compromised survival of a ppk2 knockout (PPK2-KO) of Mycobacterium smegmatis under heat or acid stress or hypoxia, and the ability of ppk2 of M. tuberculosis to complement this, confirmed that PPK2 plays a role in mycobacterial survival under stress. Intracellular ATP : GTP ratio was higher in PPK2-KO compared with the wild-type M. smegmatis, bringing to light a role of PPK2 in regulating the intracellular nucleotide pool. We present evidence that PPK2 does so by interacting with nucleoside diphosphate kinase (Ndk). Pull-down assays and analysis by surface plasmon resonance demonstrated that the interaction requires G74 of PPK2<SUB>MTB</SUB> and <SUP>109</SUP>LET<SUP>111</SUP> of Ndk<SUB>MTB</SUB>. In summary, we unravel a novel mechanism of regulation of nucleotide pools in mycobacteria. Downregulation of ppk2 impairs survival of M. tuberculosis in macrophages, suggesting that PPK2 plays an important role in the physiology of the bacteria residing within macrophages