The atp operon of alkaliphilic Bacillus pseudofirmus OF4, as in most prokaryotes, contains the eight structural genes for the F-ATPase (ATP synthase), which are preceded by an atpI gene that encodes a membrane protein of unknown function. A tenth gene, atpZ, has been found in this operon, which is upstream of and overlapping with atpI. Most Bacillus species, and some other bacteria, possess atpZ homologues. AtpZ is predicted to be a membrane protein with a hairpin topology, and was detected by Western analyses. Deletion of atpZ, atpI, or atpZI from B. pseudofirmus OF4 led to a requirement for a greatly increased concentration of Mg2+ for growth at pH 7.5. Either atpZ, atpI, or atpZI complemented the similar phenotype of a triple mutant of Salmonella typhimurium (MM281), which is deficient in Mg2+ uptake. atpZ and atpI, separately and together, increased the Mg2+-sensitive 45Ca2+ uptake by vesicles of an Escherichia coli mutant that is defective in Ca2+ and Na+ efflux. We hypothesize that AtpZ and AtpI, as homooligomers, and perhaps as heterooligomers, are Mg2+ transporter, Ca2+ transporter, or channel proteins. Such proteins could provide Mg2+, which is required by ATP synthase, and also support charge compensation, when the enzyme is functioning in the hydrolytic direction; e.g., during cytoplasmic pH regulation.