Sayyiduna Ali (may Allah be pleased with him) says: I asked the Messenger of Allah (peace and blessings be upon him) about madhi (pre-seminal fluid), and he (peace and blessings be upon him) said: "When you see madhi, perform ablution and wash your private part; and when you see the water gushing out, perform ghusl."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الطهارة / 788