The Prophet ﷺ said: If anyone leaves an animal at a place of perishing and another man brings it to life, it belongs to him who brings it to life.
عَنِ الشَّعْبِيِّ يَرْفَعُ الْحَدِيثَ إِلَى النَّبِيِّ ﷺ أَنَّهُ قَالَ مَنْ تَرَكَ دَابَّةً بِمُهْلِكٍ فَأَحْيَاهَا رَجُلٌ فَهِيَ لِمَنْ أَحْيَاهَا