Once the cores are of sufficient mass (5–10 M E), they begin to gather gas from the surrounding disk. Initially it is a slow process, increasing the core masses up to 30 M E in a few million years. After that, the accretion rates increase dramatically and the remaining 90% of the mass is accumulated in approximately 10,000 years. The accretion of gas stops when the supply from the disk is exhausted. This happens gradually, due to the formation of a density gap in the protoplanetary disk and to disk dispersal. In this model ice giants—Uranus and Neptune—are failed cores that began gas accretion too late, when almost all gas had already disappeared. The post-runaway-gas-accretion stage is characterized by migration of the newly formed giant planets and continued slow gas accretion. Migration is caused by the interaction of the planet sitting in the gap with the remaining disk. It stops when the protoplanetary disk disappears or when the end of the disk is attained. The latter case corresponds to the so-called hot Jupiters, which are likely to have stopped their migration when they reached the inner hole in the protoplanetary disk.