Sayyiduna Jabir (may Allah be pleased with him) said: We used to practise 'azl (withdrawal) in the time of the Messenger of Allah (peace and blessings be upon him), and when the Messenger of Allah (peace and blessings be upon him) learned of it, he (peace and blessings be upon him) did not forbid it.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب النكاح / 14304