Background. Electron spin resonance (EPR) is used to determine the absorbed dose of alanine dosimeters exposed to clinical photon beams in a solid-water phantom. Alanine is potentially suitable for medical reference dosimetry, because of its near water equivalence over a wide energy spectrum, low signal fading, non-destructive measurement and small dosimeter size. Material and Methods. A Bruker EMX-micro EPR spectrometer with a rectangular cavity and a measurement time of two minutes per dosimeter was used for reading of irradiated alanine dosimeters. Under these conditions a new algorithm based on scaling of known spectra was developed to extract the alanine signal. Results. The dose accuracy, including calibration uncertainty, is less than 2% (k=1) above 4 Gy (n=4). The measurement uncertainty is fairly constant in absolute terms (30 mGy) and the relative uncertainty therefore rises for dose measurements below 4 Gy. Typical reproducibility is 1% (k=1) above 10 Gy and 2% between 4 and 10 Gy. Below 4 Gy the uncertainty is higher. A depth dose curve measurement was performed in a solid-water phantom irradiated to a dose of 20 Gy at the maximum dose point (dmax) in 6 and 18 MV photon beams. The typical difference between the dose measured with alanine in solid water and the dose measured with an ion chamber in a water tank was about 1%. A difference of 2% between 6 and 18 MV was found, possibly due to non-water equivalence of the applied phantom. Discussion. Compared to previously published methods the proposed algorithm can be applied without normalisation of phase shifts caused by changes in the g-value of the cavity. The study shows that alanine dosimetry is a suitable candidate for medical reference dosimetry especially for quality control applications.