The interplay between externally induced locked modes and the plasma toroidal rotation is studied in JET L-mode plasmas, through the analysis of shots in which the non-disruptive compass scan technique (Piron et al 2024 Nucl. Fusion64 066029) was performed. In these experiments, an external magnetic field perturbation was applied up to the onset of a locked mode, with toroidal mode number = 1, at constant plasma density. In Ohmic plasmas, during the execution of the compass scan, it is observed that the toroidal rotation brakes in a wide range of the core. In the case of neutral beam injection-heated shots, the rotation braking is significantly reduced. The experimental analyses have been interpreted by the RFXlocking code adapted to the JET tokamak (Zanca et al 2015 Nucl. Fusion55 043020), which also allowed to investigate the roles of the electromagnetic force and of the neoclassical toroidal viscosity, in the rotation braking phenomenon. Plasma rotation has been analysed also during a density variation in the absence of external magnetic field perturbations, highlighting that a profile transition occurs in the core.