The extension of the cosmic-ray spectrum beyond 1 petaelectronvolt (PeV; 1015 electronvolts) indicates the existence of the so-called PeVatrons-cosmic-ray factories that accelerate particles to PeV energies. We need to locate and identify such objects to find the origin of Galactic cosmic rays1. The principal signature of both electron and proton PeVatrons is ultrahigh-energy (exceeding 100 TeV) γ radiation. Evidence of the presence of a proton PeVatron has been found in the Galactic Centre, according to the detection of a hard-spectrum radiation extending to 0.04 PeV (ref. 2). Although γ-rays with energies slightly higher than 0.1 PeV have been reported from a few objects in the Galactic plane3-6, unbiased identification and in-depth exploration of PeVatrons requires detection of γ-rays with energies well above 0.1 PeV. Here we report the detection of more than 530 photons at energies above 100 teraelectronvolts and up to 1.4 PeV from 12 ultrahigh-energy γ-ray sources with a statistical significance greater than seven standard deviations. Despite having several potential counterparts in their proximity, including pulsar wind nebulae, supernova remnants and star-forming regions, the PeVatrons responsible for the ultrahigh-energy γ-rays have not yet been firmly localized and identified (except for the Crab Nebula), leaving open the origin of these extreme accelerators.