We present the first detailed spectroscopic and photometric analysis of an eclipsing binary in the Andromeda Galaxy ( M31 ) . This is a 19.3 -mag semi-detached system with components of late-O and early-B spectral types . From the light and radial velocity curves we have carried out an accurate determination of the masses and radii of the components . Their effective temperatures have been estimated from the modeling of the absorption line spectra . The analysis yields an essentially complete picture of the properties of the system , and hence an accurate distance determination to M31 . The result is d = 772 \pm 44 kpc ( ( m - M ) _ { \circ } = 24.44 \pm 0.12 mag ) . The study of additional systems , currently in progress , should reduce the uncertainty in M31 distance to better than 5 % .