The Arabian Peninsula was originally the home of nomadic peoples who coped with the desert climate by migrating every season ("Arab" roughly translates as "desert dweller"). When some began to establish settlements around the fifth century BC, many chose Mecca, near the west coast of Saudi Arabia, as their home. It did not offer a favorable climate or many natural resources, but it was the site of the Ka'ba, a large cubical shrine dedicated to various deities.
Mecca soon became the religious center, with 360 shrines, one for each day in the lunar year. Local merchants depended heavily on pilgrims to these shrines for their livelihood, a fact which would become significant for Muhammad.
Arab polytheism was focused entirely on the earthly life, and religion was not a source of morality. By Muhammad's time, blood feuds, violence, and general immorality abounded.
Yet monotheism was not unheard of among the Arabs. There was contact with Zoroastrianism, which was the official state religion of Persia from the 3rd century BC to the 8th century AD and influential on its neighbors. It was a dualistic religion with beliefs in heaven, hell and a final judgment. In addition, both Judaism and Christianity had established a presence on the Arabian Peninsula, especially in the south. In Yathrib (later renamed Medina), the Jewish population was especially influential.
Even among the innumerable deities of Arabian polytheism was a god who was more impressive than the rest.Allah (Arabic for "the god") was "the creator, provider and determiner of human destiny," and "he was capable of inspiring authentic religious feeling and genuine devotion" (Smith, 225). In general, Allah was regarded as the greatest among the many gods deserving worship, but one contemplative sect, the hanifs, worshiped Allah exclusively.
It was into this world of sporadic monotheism and rampant immorality that Islam was born.