The azimuthal anisotropy of particles associated with jets (jet particles) at midrapidity is measured for the first time in p-Pb and Pb-Pb collisions at
$$ \sqrt{{\textrm{s}}_{\textrm{NN}}} $$
s
NN
= 5.02 TeV down to transverse momentum (p
T) of 0.5 GeV/c and 2 GeV/c, respectively, with ALICE. The results obtained in p-Pb collisions are based on a novel three-particle correlation technique. The azimuthal anisotropy coefficient v
2 in high-multiplicity p-Pb collisions is positive, with a significance reaching 6.8σ at low p
T, and its magnitude is smaller than in semicentral Pb-Pb collisions. In contrast to the measurements in Pb-Pb collisions, the v
2 coefficient is also found independent of p
T within uncertainties. Comparisons with the inclusive charged-particle v
2 and with AMPT calculations are discussed. The predictions suggest that parton interactions play an important role in generating a non-zero jet-particle v
2 in p-Pb collisions, even though they overestimate the reported measurement. These observations shed new insights on the understanding of the origin of the collective behaviour of jet particles in small systems such as p-Pb collisions, and provide significant stringent new constraints to models.