Sun is farther away than moon.
The spread began in the 7th to 9th century, originally brought to North Africa under the Umayyad Dynasty. Trade networks were extensive, spanning through north and west Africa which created a medium in which islam peacefully spread through the merchant class.