Cosmic rays are ultrarelativistic particles that are integral components of the cosmic background. The cosmic-ray energy spectrum suggests the existence of so-called galactic PeVatrons– local sources that are capable of boosting the particle energy beyond 1 PeV (1,2). In the Milky Way, the birth and death of massive stars give rise to sufficient cosmic-ray sources for supplying the required accelerating power. Through observations in the gamma-ray band, several nearby galaxies with cosmic ray power significantly exceeding the calorimetric limit of the star formation activities have been identified (3–6) such as NGC 1068, which is a nearby Seyfert galaxy (7–9). Compared to other galaxies, NGC 1068 features a modest-power kiloparsec-scale jet and one of the most active regions surrounding the central supermassive black hole (10,11). While synchrotron emission was confirmed at the jet by centimetre interferometers, the particle spectrum and acceleration site could not be identified due to limited frequency coverage and angular resolution. Here we report the high-resolution radio observations of NGC 1068, which reveal the ultrarelativistic electrons at the apex of its jet. Spectral and morphological studies of the parsec-scale radio blobs in the jet termination region show that these blobs are efficient sites of cosmic-ray acceleration with a strongly amplified magnetic field. The physical conditions revealed in the blobs imply that they are capable of accelerating protons to energies beyond the petaelectronvolt range. The estimated cosmic-ray power at the jet head exceeds the limit set by the star formation activity in this galaxy. This result suggests that even modest-power jets significantly increase the galactic cosmic-ray content while propagating through the galactic bulge.