The fundamental chemiluminescent reaction occurs when an electron in a chemical molecule receives sufficient energy from an external source to drive the electron into a higher-energy orbital. This is typically an unstable condition, and when the electron returns to the original lower-energy state, energy is emitted from the molecule as a photon. Lightning is an example of gas-phase chemiluminescence: an electrical discharge in the atmosphere drives electrons in gas molecules (such as N2 and O2) to higher-energy orbitals. When the electrons return to their original lower-energy orbitals, energy is released in the form of visible light.