Sahih Muslim | Book 37 | Chapter 2

Narrated by Abu Sirma
Abu Sirma reported that when the time of the death of Abu Ayyub Ansari drew near, he said: I used to conceal from you a thing which I heard from Allah's Messenger (may peace be upon him) and I heard Allah's Messenger (may peace be upon him) as saying: Had you not committed sins, Allah would have brought into existence a creation that would have committed sin (and Allah) would have forgiven them.

Narrated by Abu Ayyub Ansari
Abu Ayyub Ansari reported that Allah's Messenger (may peace be upon him) said: If you were not to commit sins, Allah would have swept you out of existence and would have replaced you by another people who have committed sin, and then asked forgiveness from Allah, and He would have granted them pardon.

Narrated by Abu Huraira
Abu Huraira reported Allah's Messenger (may peace be upon him) having said: By Him in Whose Hand is my life, if you were not to commit sin, Allah would sweep you out of existence and He would replace (you by) those people who would commit sin and seek forgiveness from Allah, and He would have pardoned them.