We report constraints on the sources of ultra-high-energy cosmic rays (UHECRs) above 10 9 GeV, based on an analysis of seven years of IceCube data. This analysis efficiently selects very high energy neutrino-induced events which have deposited energies from 5 × 10 5 GeV to above 10 11 GeV. Two neutrino-induced events with an estimated deposited energy of (2.6 ± 0.3) × 10 6 GeV, the highest neutrino energy observed so far, and (7.7 ± 2.0) × 10 5 GeV were detected. The atmospheric background-only hypothesis of detecting these events is rejected at 3.6σ. The hypothesis that the observed events are of cosmogenic origin is also rejected at >99% CL because of the limited deposited energy and the non-observation of events at higher energy, while their observation is consistent with an astrophysical origin. Our limits on cosmogenic neutrino fluxes disfavor the UHECR sources 3 having cosmological evolution stronger than the star formation rate, e.g., active galactic nuclei and γ-ray bursts, assuming proton-dominated UHECRs. Constraints on UHECR sources including mixed and heavy UHECR compositions are obtained for models of neutrino production within UHECR sources. Our limit disfavors a significant part of parameter space for active galactic nuclei and new-born pulsar models. These limits on the ultra-high-energy neutrino flux models are the most stringent to date. Introduction -The sources of ultra-high-energy cosmic rays (UHECRs; cosmic-ray energy E CR 10 18 eV) remain unidentified [1]. The majority of the candidate objects are extra-Galactic, such as Active Galactic Nuclei (AGN) [2-6] , γ-ray bursts [7][8][9][10][11][12][13], and starburst galaxies [14][15][16][17][18][19]. UHECR interactions with ambient photons and matter at sources generate astrophysical neutrinos with 5% of the parent UHECR energy, on average [20][21][22]. Thus, a substantial fraction of these Extremely High-Energy (EHE) astrophysical neutrinos is expected to have an energy above 10 7 GeV. Moreover, neutrinos with energies above ∼107 GeV are expected to be produced in the interactions between the highest-energy cosmic rays and background photons in the universe [23]. In the following we refer to the neutrinos produced in these interactions as cosmogenic neutrinos [24]. These astrophysical and cosmogenic EHE neutrinos can constitute key messengers identifying currently unknown cosmic accelerators, possibly in the distant universe, because their propagation is not influenced by background photon or magnetic fields.