Numerical and analytical calculations demonstrate that small planetesimals exhibit long-term stability of libration about the L4 and L5 Lagrange equilibrium points at a proto-Jupiter's distance from the Sun despite continuous dissipation of energy due to gas drag in the primordial solar nebula. This stability may mean that most of the mass of the Trojan asteroids was collisionally captured into libration and accreted into large bodies while the solar nebula was still there. If this is so, the Trojans represent samples of the material that composed Jupiter's core before the addition of the large mass of volatiles leading to the current largely gaseous planet.For a 13-M⊕. Jupiter core that is assumed not to disturb the mass distribution in the solar nebula, dissipation of orbital energy while the planetesimal is further from the Sun than the stationary point in the frame rotating with Jupiter (or the elliptic fixed point in a surface of section if Jupiter's orbit is eccentric) decreases the amplitude of libration. However, dissipation while the planetesimal is closer to the Sun than this point increases the amplitude of libration. The effects of dissipation outside the stationary point nearly cancel the effects of the dissipation inside, resulting in either a very slow increase or decrease in the amplitude of libration depending on the details of the nebular model. Those models of the nebula leading to a larger ratio of drag forces equidistant outside and inside of Jupiter's orbital distance give the librating planetesimals a higher stability. By higher stability we mean that the planetesimal is more likely to remain permanently in the region with decreasing amplitude of libration, or if the amplitude is increasing, that the rate of increase is lower. The L4 stationary points of Trojan precursors experiencing nebular drag are located more than 60° in front of Jupiter, whereas the L5 stationary points are located less than 60° behind Jupiter. The separation of these stationary points from ±60° increases as the particle diameter d decreases or the drag acceleration is otherwise increased. For a 13-M⊕ Jupiter and a nominal nebular model the stationary points at the L4 equivalent reach a maximum angular separation of about 108° in front of Jupiter for d ≈ 30 m, where smaller planetesimals do not librate in front of Jupiter. In contrast, the stationary points may be located only a few degrees behind Jupiter for d ≈ 1 m. If Jupiter has a nonzero orbital eccentricity, the stability of the trailing, L5 planetesimals is increased, but the stability of the leading, L4 planetesimals is decreased relative to the zero eccentricity case. Even if libration amplitudes are increasing slowly, the planetesimals librate around their particular stationary points in the frame rotating with Jupiter for times which are significant fractions of the nebular lifetime. This means that as Jupiter's core grows, the gentle collisions among the accumulating, librating planetesimals will induce the growth of larger Trojans.When Jupiter's mass approaches its current value, an annular gap in the distribution of nebular material is believed to form. The reversal of the radial pressure gradient on the outside of the gap means that the planetesimals are accelerated from behind when on the outside of their libration trajectories. This reverses the trend toward smaller libration amplitudes on this part of the trajectory, and the libration amplitude is increased on all parts of the libration trajectory. Small planetesimals are quickly lost, although for d > 3 km lifetimes are probably longer than the remaining life of the nebula.The striking asymmetry in the response of the planetesimals to the nebular drag between the L4 and L5 points implies that there should be an asymmetry in the numbers or total mass of Trojans remaining trapped near each stability point after the nebula is dissipated. However, these results favor more material being trapped at the trailing Trojan point, which is apparently contrary to observation. Still, the collisional evolution of the Trojans over 4.6 × 109 years may have skewed the mass distributions in such a way as to mask what was there initially, and current observational uncertainties indicate that the current apparent dominance of the L4 Trojans is not definitive.A possible history of the Trojan swarms of asteroids would have most of the mass being accumulated in libration before the nebula was dispersed, with the elimination of large libration amplitudes and dispersion in orbital inclinations occurring afterward. The dominance of high-velocity collisions after the nebula was dispersed has probably resulted in a drastic change in the size distribution and a net loss in librating mass.