Muhammad’s (saw) distress due to his inability to read reached such an extent that for weeks he didn’t want to see anyone, only wanting to be alone and reflect on this matter. None of the religions, belief systems, idols, etc., could answer the mass of questions that had accumulated in his head.
Neither Judaism, Christianity, the original format of which had been corrupted, nor idolatry meant anything to men like Muhammad (saw) and Abu Bakr (ra), even in those days. Therefore, they were automatically considered among the ‘unlettered’ ones, outside the scope of the ‘People of the Book’.
But they were not of the idolaters either, which made them of the ‘Hanif’ group among the unlettered ones. The Hanif were those who were upon the path of Abraham; the path of Oneness.
According to our knowledge, Nabi Idris informed the people of the effects of celestial beings, i.e. astrology. Yet, when he made these explanations, he also knew that the administration of these powers was with the knowledge, will and power of Allah. After the science of astrology was exposed by Nabi Idris, those who were deprived of the ability to contemplate and discern the deeper truths became veiled from the primary power at the root of the system and got caught up with the stars and planets, accrediting all the power to them. This faulty judgment eventually led to assuming the existence of gods in space and thus the deification of celestial beings.
All teachings of all Nabis are subject to corruption and deformation in time, due to the narrow-minded ones who reduce and evaluate things according to their localized, rigid visions and conditioned concepts of right and wrong.
Astrology, a system and mechanism of Allah, was also misevaluated and in time it led to the deification and idolization of celestial beings. Eventually, idols were made in the names of these stars, and the Sun, the Moon and other planets were considered to be gods and thus worshipped.
At a time like this, a Nabi named Abraham emerged and, through deep introspection, he realized the Sun, the Moon and other stars could not be gods… When he came to this realization he said:
“Certainly, I have turned my face (my consciousness) cleansed from the concept of a deity (Hanif), toward the Fatir (He who creates everything programmed according to its purpose) who created the heavens and the earth, and I am not of the dualists.”
The word face in this verse denotes consciousness, not the physical face. It is a reference to our inner face. For example, when we say someone is two-faced clearly we’re not referring to their physical face, but to something about their character. Thus, the word face is used in reference to one’s character here. We may even call it one’s spiritual or intellectual face. It is simply a reference to one’s consciousness.
Thus, when Abraham says ‘my face’ he is referring to his understanding:
I turn with my understanding, intellect, consciousness to One that is the Fatir of all that has been created in the heavens and the earth!
 Quran 6:79