Long-period comets are ejected from the Oort cloud by the gravitational pull of passing stars, molecular clouds, or the Milky Way’s tidal force, which can shift the orbits of the objects in the Oort cloud and send them into the inner Solar System. Sometimes comets that originate in the Oort cloud can be captured by gravitational forces and given a new “home.” For example, Halley’s Comet is believed to have been born in the Oort Cloud, but now it’s in the Kuiper belt.