It is narrated from Sayyiduna Samurah (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "Whoever puts an enclosure around something (that is, builds a wall around barren land), it becomes his."
Hadith Referenceالمعجم الكبير للطبراني / باب السين / 6833