The Messenger of Allah ﷺ said, "Whoever builds a wall around a piece of land, it belongs to him."
قال رسول الله ﷺ: من أحاط حائطا على أرض فهيي له.
No references are available.
Imam Ahmad narrated it (20130), and from him Abu Dawud (3077), Ibn Abu Shayba (7/76), Tabarani in al-Kabir (6865), and Bayhaqi (6/148), all of them via the route of Qatada, from Hasan, from Samura bin Jundab, and he related it. Its isnad is sahih, and it has been established that Hasan Basri heard directly from Samura bin Jundab without qualification. The hadith has corroborating narrations from Amr bin Awf and other companions, though there is some criticism in the isnads of their hadiths. See the discussions of these in Talkhis (3/54), Nasb Raya (4/171), and Minna Kubra (5/379).As for what is narrated from Asmar bin Mudarris, he said, "I came to the Prophet ﷺ and pledged allegiance to him, and he said, 'Whoever gets to something that no Muslim has gotten to before him, it is his.'" He said, "Then the people went out racing and marking off land with lines," but this is not sahih.Abu Dawud narrated it (3071), as did Bukhari in Tarikh al-Kabir (2/61-62), from Muhammad bin Bashshar, who said, Abdul-Hameed bin Abdul-Wahid narrated to me, who said, Umm Junub bint Numayla narrated to me, from her mother Suwayda bint Jabir, from her mother Uqayla bint Asmar bin Mudarris, from her father Asmar bin Mudarris, and he related it.In its isnad is Abdul-Hameed bin Abdul-Wahid, about whom Dhahabi said, "I do not know of anyone who narrated from him except Bundar." No one deemed him reliable, except that Ibn Hibban mentioned him among his reliable narrators. That is why Ibn Hajar said of him, "Acceptable," meaning when corroborated. Also in the isnad are Umm Junub bint Numayla, Suwayda, and Uqayla, and none of them had more than a single person narrating from her, nor did anyone deem them reliable, which is why Ibn Hajar considered them unknown.Munziri said in Mukhtasar Sunan (4/264), "It is a rare (gharib) narration, and Abu Qasim Baghawi said, 'I do not know of any other hadith with this isnad besides this one.'"