Anas bin Sirin (may Allah have mercy on him) said: I said to Ibn Umar (may Allah be pleased with them both): Some dirhams have been sent to me to spend in the path of Allah, and among the pilgrims are those whose provisions are running out. Shall I distribute them among them? Ibn Umar (may Allah be pleased with them both) said: Yes, distribute them among them; that too is the path of Allah. I said: I fear that my companion may have intended that they be distributed among the fighters (mujahidin). Ibn Umar (may Allah be pleased with them both) said: Distribute them among the pilgrims; they too are "in the path of Allah". I said: I fear that I may go against what I was ordered. He became angry and said: Woe to you! Are they not in the path of Allah? This was the position of Ibn Umar (may Allah be pleased with them both).
It has been narrated from Abu al-Darda that it is to be spent on military expeditions.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الوصايا / 12604