Where do ultra-high-energy cosmic rays come from? Physicists have detected an amazing variety of energetic phenomena in the universe, including beams of particles of unexpectedly high energy but of unknown origin. In laboratory accelerators, we can produce beams of energetic particles, but the energy of these cosmic rays far exceeds any energies produced on Earth. So my question is, from where do these ultra-high-energy cosmic rays come from?
 A: Here is a different answer based on new empirical facts!
Today July 12 2018 we have watched and read the public anouncement of the localisation for the first time of a source of ultra-high energy cosmic neutrinos. 
Experimental data from multimessenger astronomy (IceCube Collaboration, Fermi-LAT, MAGIC, AGILE, ASAS-SN, HAWC, H.E.S.S., INTEGRAL, Kanata, Kiso, Kapteyn, Liverpool Telescope, Subaru, Swift/NuSTAR, VERITAS, VLA/17B-403) have been collected, processed and compared to prove that:


*

*the arrival direction of a high-energy (~290 Tev) neutrino, IceCube-170922A, was consistent with the location of a known γ-ray blazar, TXS 0506+056, observed to be in a flaring state (with gamma rays up to 400 GeV) at the time of neutrino detection

*an excess of high-energy neutrino events, with respect to atmospheric backgrounds, at the position of the blazar TXS 0506+056 has been identified a posteriori between September 2014 and March 2015. It is claimed to be a 3.5σ evidence for neutrino emission from the direction of the blazar, independent of and prior to its 2017 flaring episode.


From the same public anouncement one can also read :

“The evidence for the observation of the first known source of high-energy neutrinos and cosmic rays is compelling,” says Francis Halzen, a University of Wisconsin–Madison professor of physics and the lead scientist for the IceCube Neutrino Observatory.
“Fermi has been monitoring some 2,000 blazars for a decade, which is how we were able to identify this blazar as the neutrino source,” says Regina Caputo, the analysis coordinator for the Fermi Large Area Telescope collaboration. “High-energy gamma rays can be produced either by accelerated electrons or protons. The observation of a neutrino, which is a hallmark of proton interactions, is the first definitive evidence of proton acceleration by black holes.”

Of course cosmic rays are charged particles and their paths cannot be traced directly back to their sources due to the powerful magnetic fields that fill space and warp their trajectories. But the powerful cosmic accelerators that produce them also produce neutrinos. These uncharged particles are unaffected by even the most powerful magnetic field and because they rarely interact with matter and have almost no mass travel nearly undisturbed from their accelerators, giving scientists an almost direct pointer to their source.
Thus with this new experimental breakthrough I think one can reasonably say there is a strong case for active galactic nuclei as a prominent source of ultra-high energy cosmic rays (UHECR)!.
Edit :
To quote arxiv.org/abs/1511.01590

searches for 10−100 PeV neutrinos with IceCube, KM3Net, IceCube-Gen2, ARA, ARIANNA and GRAND seem ... interesting. Improving sensitivities in this very-high energy range will allow us to constrain a significant part of the parameter
  space of various blazar neutrino models. In particular, their connection to UHECRs can be critically examined. 

The multimessenger source modelling of blazars to connect and constraint the physics of gamma rays, neutrinos and UHECRs emissions has just entered its experimental probe age!
A: Here is a topical proposal (from arxiv.org/abs/1602.06961):

The recent detection of the gravitational wave source GW150914 by the
  LIGO collaboration motivates a speculative source for the origin of
  ultrahigh energy cosmic rays as a possible byproduct of the immense
  energies achieved in black hole mergers, provided that the black holes
  have spin as seems inevitable and there are relic magnetic fields [B ≥ 10^11 Gauss] and
  disk debris remaining from the formation of the black holes or from
  their accretion history. We argue that given the modest efficiency <
  0.01 required per event per unit of gravitational wave energy release, merging black holes potentially provide an environment for
  accelerating cosmic rays to ultrahigh energies.

The authors cannot provide any precise composition and spectral features of the 
ultra-high energy cosmic rays but they claim that

The only direct evidence of an association between UHECRs and BH
  mergers can be obtained by the observation of gravitational waves in
  coincidence with high-energy neutrinos.

Let us hope that future observations of black-hole mergers tell us more!
An update (with more data on compact astronomical objects mergers): 
New computations based on the multimessenger astronomy data from the neutron star-black hole merger GW170817 seem to validate the relevance of mergers of compact astronomical objects like neutron stars as a prominent source of high energy cosmic rays in the 20-1000 PeV range.
Remark : 1000 PeV is the lower energy limit of ultra-high-heavy-cosmic-rays.
