The effects of solvation and charge-charge interactions on the pKa of ionizable groups in bacteriorhodopsin have been studied using a macroscopic dielectric model with atom-level detail. The calculations are based on the atomic model for bacteriorhodopsin recently proposed by Henderson et al. Even if the structural data are not resolved at the atomic level, such calculations can indicate the quality of the model, outline some general aspects of electrostatic interactions in membrane proteins, and predict some features. The effects of structural uncertainties on the calculations have been investigated by conformational sampling. The results are in reasonable agreement with experimental measurements of several unusually large pKa shifts (e.g. the experimental findings that Asp96 and Asp115 are protonated in the ground state over a wide pH range). In general, we find that the large unfavorable desolvation energies of forming charges in the protein interior must be compensated by strong favorable charge-charge interactions, with the result that the titrations of many ionizable groups are strongly coupled to each other. We find several instances of complex titration behavior due to strong electrostatic interactions between titrating sites, and suggest that such behavior may be common in proton transfer systems. We also propose that they can help to resolve structural ambiguities in the currently available density map. In particular, we find better agreement between theory and experiment when a structural ambiguity in the position of the Arg82 side-chain is resolved in favor of a position near the Schiff base.