Ubaydullah bin Abdullah bin Mawhab said: I heard Sayyiduna Abu Hurayrah (may Allah be pleased with him) saying: I came to Sayyiduna Umar bin al-Khattab (may Allah be pleased with him) from Sayyiduna Abu Musa (may Allah be pleased with him) with eight hundred thousand dirhams. Sayyiduna Umar (may Allah be pleased with him) asked me: What have you brought? I said: Eight hundred thousand dirhams. Sayyiduna Umar (may Allah be pleased with him) said: You have brought eighty thousand dirhams? I said: Rather, I have brought eight hundred thousand dirhams. Sayyiduna Umar (may Allah be pleased with him) said: Did I not tell you that you are a foolish Yemeni? You have brought eighty thousand dirhams; so how much is eight hundred thousand? So I counted it out a hundred thousand at a time until I had completed it. Sayyiduna Umar (may Allah be pleased with him) asked: Is it good (lawful)? Woe to you! I said: Yes. So Sayyiduna Umar (may Allah be pleased with him) spent the night sleepless, until the call was given for the morning prayer, and his wife said: O Commander of the Believers! You did not sleep last night. He said: How could Umar sleep when such wealth has come as never came before? What would make Umar safe if he were to die while that wealth was with him and he had not spent it where it is due? When he had led the morning prayer, a group of the Companions (may Allah be pleased with them) gathered around him. He said to them: Last night such wealth came as has never come before in Islam, and I have formed an opinion, so advise me: my view is that I should measure it out to the people by the measure. They said: O Commander of the Believers! Do not do so; people are entering Islam and wealth is increasing; rather, give according to a register, so that whenever the people increase and the wealth increases, you give to them accordingly. He said: Then advise me, with whom should I begin? They said: O Commander of the Believers! Begin with yourself, for you are the caliph; and some said: The Commander of the Believers knows best. Sayyiduna Umar (may Allah be pleased with him) said: No, rather I will begin with the Messenger of Allah (peace and blessings be upon him), then those who are closest (to him). So the register (diwan) was set up. Ubaydullah said: He began with Hashim and al-Muttalib and gave all of them, then he gave Banu Abd Shams, then Banu Nawfal; and he began with Banu Abd Shams because he (Abd Shams) was Hashim's brother through his mother. Ubaydullah said: The first to make a distinction between Banu Hashim and Banu al-Muttalib was Abd al-Malik.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب قسم الفيء والغنيمة / 13070