Caption: 
SwRI scientists modeled a Ceres-sized object crashing into Mars at an oblique angle. These four frames from the 3-D simulation show that the impact initially produces a disk of orbiting debris primarily derived from Mars (bottom right frame). The outer portions of the disk later accumulate into Mars’ small moons, Phobos and Deimos. The inner portions of the disk accumulate into larger moons that eventually spiral inward and are assimilated into Mars.  

Credit: 
Image Courtesy of Southwest Research Institute