ATP-binding residues in the N and P domains of sarcoplasmic reticulum Ca-ATPase have been investigated using mutagenesis in combination with a binding assay based on the photolabeling of Lys(492) with [gamma-P-32] 2',3'-O-(2,4,6 trinitrophenyl)-8-azido-ATP and competition with nucleotide. In the N domain, mutations to several residues in conserved motifs, (438)GEATE, (FSRDRK)-F-487, (515)KGAPE, and (560)RCLALA produce nucleotide-binding defects. Key residues include Tbr(441), Glu(442) Phe(487), Arg(489) Lys(492) Lys(515), and Arg(560) are Arg(560), and Leu(562). In the absence of Mg2+, Arg(489), Lys(492), most important, whereas in its presence Thr(441) and Glu(442) also play a crucial role. In the P domain, Asp is striking for its strong electrostatic repulsion of the gamma-phosphate, especially in the presence of Mg2+. Lys(352) is a key residue, and Asp(627) and Lys(684) must come close to the nucleotide. Thr(353), Asn(359), Asp(601), and Asp(703) interact only in the presence of Mg2+. Asn(706) and Asp(707) are unimportant for nucleotide binding. The results identify several ATP binding residues in the N and P domains and suggest that Mg2+ changes the nucleotide/protein interaction in both. Models of bound ATP and MgATP are presented.