The molecular and electronic structures of Co(II)-substituted azurin have been investigated using several realistic models of the metal coordination sphere. The geometry of the models was optimized using the hybrid density functional B3LYP method and compared to the structures obtained for similar Cu(II) models. It is found that Co(LI) prefers a distorted tetrahedral structure with four strong bonds to two histidine nitrogens, the cysteine sulphur, and the backbone carbonyl group. This is in contrast to Cu(II), where two weak axial bonds to methionine and the backbone oxygen are found, combined with three strong bonds to the histidines and cysteine in the equatorial plane of a trigonal bipyramidal structure. The optimal structure of the models conforms with experimental crystal data, indicating that the active-site structure in these proteins is determined by the preferences of the metal ion and its ligand and not by protein strain. The electronic structure and spectrum of the Co(imidazole)(2)(SH)(SH)(2)(HCONH2)(+) model have been investigated in detail using multiconfigurational second-order perturbation theory based on a complete active-space wavefunction (CASPT2). Nine ligand-field transitions and six S-cys --> Co charge-transfer transitions have been calculated, and all experimentally observed absorption bands in the absorption spectrum of Co(II) azurin have been assigned. It is shown that the Co-S-cys bond is more ionic than the Cu-S-cys bond and that this causes the blue shift and weakening of the charge-transfer states in the spectrum of Co(II)-substituted azurin compared to native copper protein.