Planetary nebula
The stars in planetary nebulae are very hot. They are not very bright, though. This means that they must be very small. The only time that stars get that small is when they are dying. That means that they are one of the last steps in a star's death. Astronomers saw that all planetary nebula are expanding. This meant that they were caused by a star's outer layers being thrown into space at the end of its life.