Sayyiduna al-Miqdam bin Ma'di Karib (may Allah be pleased with him) said that the Messenger of Allah (peace and blessings be upon him) said: "Hosting a guest for one night is an obligatory right. If he spends the morning deprived in someone's courtyard, then it becomes obligatory upon the Muslims to help him, until they secure his right for him from that person's crops and livestock, because he was deprived of the right of hospitality."
Hadith Referenceالمعجم الكبير للطبراني / باب الميم / 17799