It is narrated from Ata (may Allah have mercy on him) concerning the saying of Allah Almighty: "And know that whatever you take as spoils of anything, then indeed one-fifth of it is for Allah and for the Messenger" [Surah al-Anfal: 41], that the one-fifth belongs to Allah and His Messenger (peace and blessings be upon him); the Prophet (peace and blessings be upon him) used to spend it wherever he wished.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب قسم الفيء والغنيمة / 12942