The NH(3)-dependent NAD(+) synthetase (NADS) participates in the biosynthesis of nicotinamide adenine dinucleotide (NAD(+)) by transforming nicotinic acid adenine dinucleotide (NaAD) to NAD(+). The structural behavior of the active site, including stabilization of flexible loops 82-87 and 204-225, has been studied by determination of the crystal structures of complexes of NADS with natural substrates and a substrate analog. Both loops are stabilized independently of NaAD and solely from the ATP-binding site. Analysis of the binding contacts suggests that the minor loop 82-87 is stabilized primarily by a hydrogen bond with the adenine base of ATP. Formation of a coordination complex with Mg(2+) in the ATP-binding site may contribute to the stabilization of the major loop 204-225. The major loop has a role in substrate recognition and stabilization, in addition to the protection of the reaction intermediate described previously. A second and novel Mg(2+) position has been observed closer to the NaAD-binding site in the structure crystallized at pH 7.5, where the enzyme is active. This could therefore be the catalytically active Mg(2+).