Allah instructed Muhammad to ask forgiveness for his sin >So know, [O Muhammad], that there is no deity except Allah and **ask forgiveness for your sin** and for the believing men and believing women. And Allah knows of your movement and your resting place.. Surat Muhammad 47:19 Muhammad, despite being a prophet, was a human like the rest of us, and was not sinless according to the Allah (The Qur'an itself).