Supernovas in the Milky Way are the likeliest source for most of the cosmic rays reaching Earth. However, calculations show that supernovas cannot produce ultrahigh-energy cosmic rays (UHECRs), which have energies exceeding 1018 electron volts. It would seem sensible to seek the source of these in the universe's most conspicuous energy factories: quasars and gamma-ray bursts billions of light-years away from Earth. But UHECRs tend to collide with photons of the cosmic microwave background – pervasive radiation that is a relic of the early universe. The odds favor a collision every 20 million light-years, each collision costing 20 percent of the cosmic ray's energy. Consequently, no cosmic ray traveling much beyond 100 million light-years can retain the energy observed in UHECRs.