The Messenger of Allah ﷺ said, "Whoever builds a wall around a piece of land, it belongs to him."
حدثنا محمد بن بشر حدثنا سعيد بن أبي عروبة حدثنا قتادة عن سليمان بن قيس اليشكري
أن رسول الله ﷺ قال من حاط حائطا على أرض فهي له
No references are available.
Its isnad is sahih. The hadith was narrated by Abu Dawud, 3/456, no. 3077, in Kharaj, Ihya al-Mawat. And Tabarani in al-Kabir, 7/208, no. 6867. And Tahawi in Maani al-Athar, 3/268. All the scholars said, this applies to what no one has yet taken possession of.