  Density-functional calculations of the phonon spectrum and electron-phonon
coupling in MgB$_2$ are presented. The $E_{2g}$ phonons, which involve in-plane
B displacements, couple strongly to the $p_{x,y}$ electronic bands. The
isotropic electron-phonon coupling constant is calculated to be about 0.8.
Allowing for different order parameters in different bands, the superconducting
$\lambda$ in the clean limit is calculated to be significantly larger. The
$E_{2g}$ phonons are strongly anharmonic, and the non-linear contribution to
the coupling between the $E_{2g}$ modes and the p$_{x,y}$ bands is significant.
