The Genesis Device was a Federation terraforming device designed to transform a lifeless world into a living planet within minutes, but it also had terrifying potential as a weapon.
Dr. Carol Marcus and her son David Marcus led the Genesis Project from the Regula I space laboratory. Their device was meant to reorganize matter on a dead planet at the subatomic level, producing a habitable world with air, water and life. The same process, used on an inhabited planet, would wipe out everything already living there.
Khan Noonien Singh seized the device and, facing defeat in the Mutara Nebula, set it off aboard the Reliant. The detonation formed the Genesis Planet out of the nebula's matter, and the body of Spock, who had died saving the Enterprise, was laid to rest on its surface.
The new world soon proved unstable, because David Marcus had used protomatter in the Genesis matrix. Spock's body regenerated on the planet, a Klingon commander named Kruge tried to obtain the secret of Genesis as a weapon, and David was killed before the planet tore itself apart.