Narrated Samurah:The Prophet (ﷺ) said: If anyone surrounds a land with a wall, it belongs to him.
حَدَّثَنَا أَحْمَدُ بْنُ حَنْبَلٍ، حَدَّثَنَا مُحَمَّدُ بْنُ بِشْرٍ، حَدَّثَنَا سَعِيدٌ، عَنْ قَتَادَةَ، عَنِ الْحَسَنِ، عَنْ سَمُرَةَ، عَنِ النَّبِيِّ صلى الله عليه وسلم قَالَ " مَنْ أَحَاطَ حَائِطًا عَلَى أَرْضٍ فَهِيَ لَهُ " .
AbuDaud
Tribute, Spoils, and Rulership (Kitab Al-Kharaj, Wal-Fai' Wal-Imarah) • Hadith 3077