Abu Wa'il (may Allah have mercy on him) said: The Messenger of Allah (peace and blessings be upon him) distributed the spoils of Hunayn at Ji'ranah. Imam Darimi (may Allah have mercy on him) said: In its chain of narration is Sayyiduna Abdullah ibn Mas'ud (may Allah be pleased with him).
Brief Explanation
(Commentary on Hadith 2503)
The Battle of Hunayn took place in the valleys of Ta’if, and Ji‘irranah is a location between Ta’if and Makkah. From the distribution of spoils at this place, it is derived that the spoils of war (ghanimah) can also be distributed in enemy territory; it is not necessary that the spoils be distributed only after reaching one’s own place of settlement.