Sunan Abi Dawud, Book 15, Hadith 153 (Abu Dawud 2630)

Narrated Mu'adh ibn Anas al-Juhani:

I fought along with the Prophet (ﷺ) in such and such battles. The people occupied much space and encroached on the road. The Prophet (ﷺ) sent an announcer to announce among the people: Those who occupy much space or encroach on the road will not be credited with jihad.