When a nucleus in an excited energy state undergoes a transition to its ground state by releasing a gamma ray.