The electronic structure of AlB 2 -type diborides and related compounds has been investigated in firstprinciples calculations with the molecular cluster discrete variational method. For MgB 2 was studied the effect of the lattice relaxation on the total density of states at the Fermi energy ðNðE F ÞÞ. The results indicated that a contraction of about 2% in the lattice spacings a and c can lead to a slight increase of NðE F Þ for boron. In the MB 2 diborides, M = Al, Ti, V, Cr, Zr, Nb, Mo and Ta, the largest contributions to NðE F Þ is observed for Cr, Mo and Nb. TiB 2 possess the highest chemical stability in the series. The electronic specific heat coefficient g also is calculated for the diborides. The method is employed to obtain the partial B2p contribution to the total DOS at the Fermi level with the introduction of a monolayer of solute atoms as a substitution for Mg atoms of Na, Al, Ca, Ti, V, Cr, Zr, Nb, Mo and Ta in layered superstructures . . . /M/B 2 /Mg/B 2 / . . . . A stronger covalent bonding between boron atoms is identified in these cases.