In this paper we report on the effect of hydroxyl (OH) groups on the photoluminescence in the near IR (1.5 and 1.3 micrometers ) in rare earth (Er, Pr)-doped glasses. The 1.5 micrometers emission of Er-doped phosphate glasses was studied, before and after a special heat treatment. The luminescent lifetime of the 1.5 micrometers emission increases substantially, typically from 3 ms up to 7.2 ms for a 2 mole% Er2O3-doped phosphate glass, due to the controlled heat treatment. The increase in lifetime is ascribed to a decrease in OH- concentration, which is confirmed by IR-absorption spectroscopy. The quenching by OH is described by a simplified quenching model, which predicts the 1.5 micrometers emission lifetime as a function of Er- concentration with the OH-concentration as parameter. It appears that the larger part of the OH groups is coupled to Er ions and thus acts as quenching center. Photoluminescence quenching by OH groups is also reported for the 1.3 micrometers emission of Pr in GeS2-glasses: In pure OH-free GeS2 glass the 1.3 micrometers emission lifetime is as high as 350 microsecond(s) , for a 400 ppm dopant level. In GeS2 glasses containing only small amounts of OH (approximately 100 ppm), this lifetime is less than 200 microsecond(s) . Both examples demonstrate that for the fabrication of efficient glass optical amplifiers at the telecommunication windows 1.3 and 1.5 micrometers , the OH-impurity level of the host glass must be kept as low as possible.