In some extrasolar planetary systems, gas giant planets are observed at the right distance from their star to be in the habitable zone, but it is not known whether gas giants can support life. In the Solar System, migrations of the giant planets could have helped corral and stabilize the orbits of the inner planets, so that they reside in or near the habitable zone. Migration of Jupiter may have scattered nearby planetesimals and kept Mars small, thereby reducing Mars’s ability to hold on to its atmosphere and its liquid water, and making it a less likely starting point for life. The shuffling of the outer planets may be responsible for the period of heavy bombardment, which brought at least some of Earth’s atmosphere, water, and possibly organic molecules.