Muhammad’s wife Hafsa once caught him in her bed with another woman—his slave-girl, Mary the Copt. Seeking to avoid further conflict, Muhammad promised that he would stop having sex with Mary. Later, however, Muhammad received one of his infamous morally convenient revelations from Allah.
Hafsa caught Muhammad in adultery
Mary the Copt was a gift slave, and not captured in war. [1 ] The quran only permits men to have sex with captured slaves.  (Which by itself is disgusting enough, but let’s move on)
(those (slaves) whom your right hand possesses whom Allah has given to you,) means, `the slave-girls whom you took from the war booty are also permitted to you.’ Ibn Kathir 33:50
Hafsa caught Muhammad in the act of having sex with Mary the Copt in her own house in her very own bed.
“O Prophet! Why do you prohibit what God has made lawful for you, in terms of your Coptic handmaiden Māriya — when he lay with her in the house of Hafsa, who had been away, but who upon returning [and finding out] became upset by the fact that this had taken place in her own house and on her own bed — by saying, ‘She is unlawful for me!’, seeking, by making her unlawful [for you], to please your wives? And God is Forgiving, Merciful, having forgiven you this prohibition.” Tafsir Al-jalalain on verse 66:1
To silence the whole affair, he told Hafsa: ‘Do not reveal it!’ . But Hafsa told Aisha, and she took Hafsa’s side in the conflict against Muhammad. They would not leave him alone about this scandal. Things got totally out of control. Muhammad could be facing charges of adultery. The two wives seemed to have the upper hand on the prophet, and they would not be silenced this time.
Allah to the rescue
Allah solved this problem by sending down a couple of verses to defend his prophet’s adulterous behavior . Isn’t that neat? Good ‘ol Allah – always on time to rescue the prophet.
“O Prophet, why do you prohibit [yourself from] what Allah has made lawful for you, seeking the approval of your wives? And Allah is Forgiving and Merciful.” Sura 66:1
So, first off Allah not only defends Muhammad’s clear cut act of adultery, he instead rebukes Muhammad for not standing up for his behavior in fear of his wives. Secondly, Allah gives Muhammad the right to break his oath to his wifes (Muhammad promised them not to have sex with Mary the Copt) in the next verse! 
Allah has already ordained for you the dissolution of your oaths. And Allah is your protector, and He is the Knowing, the Wise. Sura 66:2
Since the Qur’an is supposedly Allah’s eternal Word, Allah had nothing better to do than compose verses giving Muhammad the right to break his oath to his wives so that he could continue having sex with his slave-girl? The real case is of course, that there is no allah, and that Muhammad fabricated these verses to protect himself from being exposed.
Umar makes quran verses
Let’s read a very revealing verse from the hadiths that helps us understand where Muhammad’s help came from. It did not come from allah, but from one of his friends.
My Lord agreed with me in three things: -1. I said, “O Allah’s Messenger (ﷺ), I wish we took the station of Abraham as our praying place (for some of our prayers). So came the Divine Inspiration: And take you (people) the station of Abraham as a place of prayer (for some of your prayers e.g. two rak`at of Tawaf of Ka`ba)”. (2.125) -2. And as regards the (verse of) the veiling of the women, I said, ‘O Allah’s Messenger (ﷺ)! I wish you ordered your wives to cover themselves from the men because good and bad ones talk to them.’ So the verse of the veiling of the women was revealed. -3. Once the wives of the Prophet (ﷺ) made a united front against the Prophet (ﷺ) and I said to them, ‘It may be if he (the Prophet) divorced you, (all) that his Lord (Allah) will give him instead of you wives better than you.’ So this verse (the same as I had said) was revealed.” (66.5). (Sahih al-Bukhari Book 8, Hadith 53)
The solution to this dilemma came from Umar. And after Umar threatened Hafsa and Aisha of divorce, it became a verse in the quran. Suddenly Umar became a prophet and a messenger of Allah. Suddenly, Umar is making quran verses. Mashalla!
The threat – back down, or else…
So Muhammad had the solution from Umar – a threat of divorce if they do not shut up. Now, to further make them understand that if they decide to continue to side against Muhammad, he would have everyone against them. He seals the deal with sura 66:4.
In case you two repent to Allah, then your hearts are readily attentive; and in case you two back one another against him, then surely Allah, Ever He, is his Patronizer, and Jibril, (Angle Gabriel) and the righteous (among) the believers, and, after that, the Angels are (his) backers. Sura 66:4
Think about it, muslims. If Allah was all powerful, wouldn’t it be enough to state that Allah would be against the wives? Instead we have Allah, Jibril, all muslims, and all angels! Suddenly all muslims and the whole heaven are involved in this family feud to help Muhammad with his unlawful sexual desires.
So, we conclude, from solid muslim sources, that muhammad was an adulterer. But allah did not mind. On the contrary – he came to defend muhammad’s filthy behavior.