It is narrated from Haram bin Sa'd bin Muhayyisah that Sayyiduna al-Bara bin Azib (may Allah be pleased with him) had a she-camel; it entered a man's garden and caused damage in it, and he (peace and blessings be upon him) ruled: "By day, guarding the garden is the responsibility of its owner, and if animals damage the garden at night, the owner of the animals will be liable."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب السرقة / 17289