Alqamah narrated that Sayyiduna Ibn Mas'ud (may Allah be pleased with him) was asked about coitus interruptus ('azl), and he said: "If Allah has taken the covenant of a soul in the loins of a man, and then he were to spill it onto a rock, Allah would bring it out even from that rock. So if you wish, then complete (the act), and if you wish, do not practise 'azl."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 9629