Sayyiduna Sa'id bin al-Musayyib and Haram bin Sa'd narrate that Bara's she-camel entered a people's garden and caused damage. So the Messenger of Allah (peace and blessings be upon him) decided that during the day, the protection of the crops is the responsibility of the owner, and at night, any damage caused by the animals is the responsibility of the owners of the animals. Ibn Maqri has also narrated the same meaning with a few changes in wording.
Hadith Referenceالمنتقى ابن الجارود / كتاب الطلاق / 796
Hadith Takhrijاز غلام مصطفےٰ ظهير امن پوري:«إسناده ضعيف لإرساله: مسند الإمام أحمد: 295/4، سنن أبي داود: 3570، سنن ابن ماجه: 2332، اس حدیث کو امام حاکم رحمہ اللہ (47/2، 48) نے صحيح الإسناد کہا ہے، حافظ ذہبی رحمہ اللہ نے صحیح کہا ہے، اسے امام مالک رحمہ اللہ (747/2، 748) نے بھی روایت کیا ہے۔»