Imam al-Shafi'i (may Allah have mercy on him) said: "Ghanimah (spoils of war) and fay' are alike in that, from the whole of both of them, the khumus (one-fifth) belongs to those whom Allah Almighty has named in the two verses."
And he said in his old (opinion): "The khumus is taken only from that wealth which was obtained by spurring on (horses and camels) against it (that is, by fighting)."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب قسم الفيء والغنيمة / Q12720