And the Noble Prophet (peace and blessings be upon him) said: "The town which you entered and stayed in for some time, after its conquest, you have a share in its spoils. And the town that disobeys Allah and His Messenger, then its fifth is for Allah and His Messenger, then it is for you."
Hadith Referenceمسند احمد / مسند المكثرين من الصحابة / 8216