  The 2:1 mean-motion resonance with Jupiter harbours two distinct groups of
asteroids. The short-lived population is known to be a transient group
sustained in steady state by the Yarkovsky semimajor axis drift. The long-lived
asteroids, however, can exhibit dynamical lifetimes comparable to
$4\,\mathrm{Gyr}$. They reside near two isolated islands of the phase space
denoted $\mathrm{A}$ and $\mathrm{B}$, with an uneven population ratio
$\mathrm{B}/\mathrm{A} \simeq 10$. The orbits of $\mathrm{A}$-island asteroids
are predominantly highly inclined, compared to island $\mathrm{B}$. The
size-frequency distribution is steep but the orbital distribution lacks any
evidence of a collisional cluster. These observational constraints are somewhat
puzzling and therefore the origin of the long-lived asteroids has not been
explained so far.
  With the aim to provide a viable explanation, we first update the resonant
population and revisit its physical properties. Using an $N$-body model with
seven planets and the Yarkovsky effect included, we demonstrate that the
dynamical depletion of island $\mathrm{A}$ is faster, in comparison with island
$\mathrm{B}$. Then we investigate (i) the survivability of primordial resonant
asteroids and (ii) capture of the population during planetary migration,
following a recently described scenario with an escaping fifth giant planet and
a jumping-Jupiter instability. We also model the collisional evolution of the
resonant population over past $4\,\mathrm{Gyr}$. Our conclusion is that the
long-lived group was created by resonant capture from a narrow part of
hypothetical outer main-belt family during planetary migration. Primordial
asteroids surviving the migration were probably not numerous enough to
substantially contribute to the observed population.
