It is narrated from Haram bin Muhayyisah (may Allah have mercy on him) that a she-camel of Sayyiduna al-Bara' bin Azib (may Allah be pleased with him) entered the garden of some people and ruined their crops. So the Messenger of Allah (peace and blessings be upon him) ruled that the owners of animals are obliged to guard their animals by night, and the owners of crops are obliged to guard their crops by day.
Hadith Referenceالمعجم الكبير للطبراني / باب السين / 5451