We show that metal line blanketing has an important effect on the atmo
spheres of hot stars, and we argue that the omission of metal line bla
nketing in previous non-LTE model atmospheres of O-type stars has led
to underestimates of surface gravity and stellar mass. In addition to
wind emission, metal line blanketing contributes to the solution of th
e long-standing discrepancy between spectroscopic and evolutionary mas
ses for O-type stars. To support our argument, we calculated a series
of non-LTE stellar atmospheres for O and Of-type stars. We compared th
e predicted profiles of hydrogen and helium lines produced by (1) a st
atic plane-parallel H-He model, (2) a metal line-blanketed static mode
l, and (3) an extended expanding model atmosphere. We find that simple
H-He models produce stronger lines than do our metal line-blanketed m
odels. Consequently, they lead to underestimated gravities. Wind emiss
ion is more effective in filling in the wings of H or He lines in the
case of large mass-loss rates typical of extreme Of stars. These findi
ngs apply equally to young, massive O-type stars and to highly evolved
stars, i.e., central stars of planetary nebulae. The lower gravities
derived from H-He models yield underestimated masses for young O-type
stars, and overestimated masses for highly evolved stars.