I've recently read that red-shift is caused when a photon escapes a star and loses some of its energy, lowering its frequency and therefore making it appear redder. However, I've become very familiar with the fact that light will red-shift as it travels across the universe; I've been under the impression that this is due to the expansion of the universe, which somehow stretches the wavelength of the photon, making it redder. Am I correct in what I have said? Are these two distinct mechanisms which lower a photon's frequency, or are they the same thing? I have a rather loose conception of how the expansion of space may stretch a photon's frequency, and I think this may be because I heard it on a layman's documentary.