Sahih Muslim Book 8, Hadith Number 3383.

Chapter: Al-Azl (incomplete sexual intercourse): Coitus Interruptus.

Jabir (Allah be pleased with him) reported that a man came to Allah’s Messenger (May peace be upon him) and said: I have a slave-girl who is our servant and she carries water for us and I have intercourse with her, but I do not want her to conceive. He said: Practise ‘azl, if you so like, but what is decreed for her will come to her. The person stayed back (for some time) and then came and said: The girl has become pregnant, whereupon he said: I told you what was decreed for her would come to her.