The Prophet ﷺ said, "Whoever encloses a piece of land with a wall, it belongs to him."
حدثنا أحمد بن حنبل حدثنا محمد بن بشر حدثنا سعيد عن قتادة عن الحسن
عن النبي ﷺ قال من أحاط حائطا على أرض فهي له
[Its chain of transmission is daif] Nasai narrated it in Al-Kubra: 3/405, no. 5763, from the hadith of Saeed Ibn Abu Aruba, and Tayalisi, no. 906, from the hadith of Hisham, both of them from Qatada, and he is a mudallis and narrated using "an" without stating direct hearing, yet Ibn Jarud graded it sahih, no. 1015.