  We present the largest collection of RR Lyrae stars in the Magellanic System
and in its foreground. The sample consists of 45 451 RR Lyr stars, of which 39
082 were detected toward the Large Magellanic Cloud and 6369 toward the Small
Magellanic Cloud. We provide long-term time-series photometric measurements
collected during the fourth phase of the Optical Gravitational Lensing
Experiment (OGLE-IV).
  We discuss several potential astrophysical applications of our collection:
investigation of the structure of the Magellanic Clouds and the Galactic halo,
studies of the globular clusters in the Magellanic System, analysis of
double-mode RR Lyr stars, and search for RR Lyr stars in eclipsing binary
systems.
