Nonequilibrium route to nanodiamond with astrophysical implications.