We demonstrate an x-ray laser at a wavelength of 13.9 nm with a beam divergence of 0.2 mrad, which is 1.8 times the diffraction limit. The x-ray laser is generated with two gain media; the seed x-ray pulse from the first medium is amplified in the second medium. The effect of refraction on x-ray propagation is reduced by spatially and temporally controlling the injection of the seed x-ray to the second medium.