Abstract. Mediterranean cyclones are extratropical cyclones, typically of smaller size and weaker intensity than other cyclones that develop over the main open ocean storm tracks. Nevertheless, Mediterranean cyclones can attain high intensities, even comparable to the ones of tropical cyclones, and thus cause large socio-economic impacts in the densely populated coasts of the region. After cyclogenesis takes place, a large variety of processes are involved in the cyclone’s development, contributing with positive and negative potential vorticity (PV) changes to the lower-tropospheric PV anomalies in the cyclone center. Although the diabatic processes that produce these PV anomalies in Mediterranean cyclones are known in principle, it is still an open question whether they occur locally within the cyclone itself or remotely in the environment (e.g., near high orography) with a subsequent transport of high-PV air into the cyclone center. This study introduces a Lagrangian method to determine the origin of the lower-tropospheric PV anomaly, with an average amplitude of 1.2 PVU, relative to the tracks of cyclones identified in ERA5 reanalyses. We define and quantify so-called "cyclonic" and "environmental" PV and find that the main part of the lower-tropospheric PV anomaly (60 %) is produced within the cyclone, shortly prior (-12 h) to the cyclones mature stage. Nevertheless, in 10 % of the cyclones the environmental PV production near the mountains surrounding the Mediterranean basin plays the dominant role for the low-tropospheric PV anomaly, and therefore the intensity of the circulation associated with these cyclones. An additional investigation of IFS simulations with detailed output from physical parameterizations reveals that the major PV production inside the cyclone is typically due to convection and large-scale microphysics, whereas convection and turbulent momentum tendencies evoke most of the positive PV changes found in the environment.