A variable-temperature (79, 145, and 293 K) extended x-ray absorption fine structure study, using rare-earth LIII absorption edges, is reported for phosphate glasses doped with rare-earth elements (R, where R = La, Ce, Pr, Nd, Sm, Eu, Gd, Tb, Dy, Ho, and Er) with compositions close to metaphosphate, R(PO3)3. The results yield nearest-neighbor R–O distances that demonstrate the lanthanide contraction in a glassy matrix and an R–O coordination intermediate between 6 and 7 for rare-earth ions with smaller atomic number (Z) and 6 for rare-earth ions with larger Z. Thermal parameters show no significant changes in R–O distances or coordination numbers between 293 and 79 K. There is evidence of an R–P correlation between 3.3 and 3.6 Å and the beginning of a second R–O correlation at approximately 4 Å. No R–R correlations up to a distance of approximately 4 Å were observed.