The European XFEL is a hard X-ray free-electron laser (FEL) based on a high-electron-energy superconducting linear accelerator. The superconducting technology allows for the acceleration of many electron bunches within one radio-frequency pulse of the accelerating voltage and, in turn, for the generation of a large number of hard X-ray pulses. We report on the performance of the European XFEL accelerator with up to 5,000 electron bunches per second and demonstrating a full energy of 17.5 GeV. Feedback mechanisms enable stabilization of the electron beam delivery at the FEL undulator in space and time. The measured FEL gain curve at 9.3 keV is in good agreement with predictions for saturated FEL radiation. Hard X-ray lasing was achieved between 7 keV and 14 keV with pulse energies of up to 2.0 mJ. Using the high repetition rate, an FEL beam with 6 W average power was created.