What religion would Muhammed have been before the foundation of Islam?

Here is the top comment from a previous thread about this very topic:

Credit: u/anidal

Muhammad's people, prior to the advent of Islam, followed what is referred to by Muslims as "Jahiliyya" which was a form of Paganism. In this belief system, Allah was the creator god and the supreme god of the pre-Islamic Arabs. However, numerous intermediaries were set below Allah such as his daughters "Allat", "AlUzza" and "Manat" who would intercede on behalf of their worshippers. Over time more and more Gods had been added to this ever-inclusive religion to represent most of the gods of other tribes in Arabia. Representations (idols) of each were kept in the Ka'ba which became a focal point and pilgrimage site of pre-Islamic Arabs. Muhammad is never portrayed as indulging in this religion but he must've been influenced by it. Muhammad is also believed to be strongly influenced by monotheistic religions such as Judaism and Christianity, adherents of which had a strong presence in Makkah thanks to it being a hub of trade. Additionally, there was a group of Makkans called the Hanifs who are said to have rejected the idol worship of their people to follow their faith monotheistically. They considered themselves to be "the followers of Abraham" who was known to have preached a monotheistic faith. As some of these Hanifs were closely related to Muhammad, it is believed that he spent a lot of time discussing faith with them. We don't know what parts of, or if, Muhammad followed any of these religions, but he was likely well versed in the belief systems of his time and certainly would have been deeply versed in philosophy and religion which led to the long periods of meditation he took up in the mountains as he reached middle age and where Islam is said to have been revealed to him. (Much of this is sourced from Reza Aslan: "No God but God")

/r/AskHistorians Thread