Generating X-rays that have the properties of laser light has been a long-standing goal for experimental science. Here we describe the emission of highly collimated, spatially coherent X-rays, at a wavelength of about 1 nanometre and at photon energies extending to 1.3 kiloelectronvolts, from atoms that have been ionized by a 5-femtosecond laser pulse. This means that a laboratory source of laser-like, kiloelectronvolt X-rays, which will operate on timescales relevant to many chemical, biological and materials problems, is now within reach.