  We analyze a sample of 139 near-Earth asteroids (NEAs), defined as those that
reach perihelion distances $q < 1.3$ au, and that also fulfill the conditions
of approaching or crossing Jupiter's orbit (aphelion distances $Q > 4.8$ au),
having Tisserand parameters $2 < T < 3$ and orbital periods $P < 20$ yr. In
order to compare the dynamics, we also analyze a sample of 42 Jupiter family
comets (JFCs) in near-Earth orbits, i.e. with $q < 1.3$ au. We integrated the
orbits of these two samples for $10^4$ yr in the past and in the future. We
find that the great majority of the NEAs move on stable orbits during the
considered period, and that a large proportion of them are in one of the main
mean motion resonances with Jupiter, in particular the 2:1. We find a strong
coupling between the perihelion distance and the inclination in the motion of
most NEAs, due to Kozai mechanism, that generates many sungrazers. On the other
hand, most JFCs are found to move on very unstable orbits, showing large
variations in their perihelion distances in the last few $10^2 - 10^3$ yr,
which suggests a rather recent capture in their current near-Earth orbits. Even
though most NEAs of our sample move in typical 'asteroidal' orbits, we detect a
small group of NEAs whose orbits are highly unstable, resembling those of the
JFCs. These are: 1997 SE5, 2000 DN1, 2001 XQ, 2002 GJ8, 2002 RN38, 2003 CC11,
2003 WY25, 2009 CR2, and 2011 OL51. These objects might be inactive comets, and
indeed 2003 WY25 has been associated with comet Blanpain, and it is now
designed as comet 289P/Blanpain. Under the assumption that these objects are
inactive comets, we can set an upper limit of $\sim 0.17$ to the fraction of
NEAs with $Q > 4.8$ au of cometary origin, but it could be even lower if the
NEAs in unstable orbits listed before turn out to be {\it bona fide} asteroids
from the main belt.
