When Haroun er Reshid put Jaafer the Barmecide to death, he commanded that all who wept or made moan for him should be crucified; so the folk abstained from this. Now there was a Bedouin from a distant desert, who used every year to make and bring to Jaafer an ode in his honour, for which he rewarded him with a thousand diners; and the Bedouin took them and returning to his own country, lived upon them, he and his family, for the rest of the year. Accordingly, he came with his ode at the wonted time and finding Jaafer done to death, betook himself to the place where his body was hanging, and there made his camel kneel down and wept sore and mourned grievously. Then he recited his ode and fell asleep. In his sleep Jaafer the Barmecide appeared to him and said, 'Thou hast wearied thyself to come to us and findest us as thou seest; but go to Bassora and ask for such a man there of the merchants of the town and say to him, "Jaafer the Barmecide salutes thee and bids thee give me a thousand diners, by the token of the bean."'

When the Bedouin awoke, he repaired to Bassora, where he sought out the merchant and repeated to him what Jaafer had said in the dream; whereupon he wept sore, till he was like to depart the world. Then he welcomed the Bedouin and entertained him three days as an honoured guest; and when he was minded to depart, he gave him a thousand and five hundred diners, saying, 'The thousand are what is commanded to thee, and the five hundred are a gift from me to thee; and every year thou shalt have of me a thousand diners.' When the Bedouin was about to take leave, he said to the merchant, 'I conjure thee, by Allah, tell me the story of the bean, that I may know the origin of all this.' 'In the early part of my life,' replied the merchant, 'I was miserably poor and hawked hot boiled beans about the streets of Baghdad for a living.

I went out one cold, rainy day, without clothes enough on my body to protect me from the weather, now shivering for excess of cold and now stumbling into the pools of rain-water, and altogether in so piteous a plight as would make one shudder to look upon. Now it chanced that Jaafer was seated that day, with his officers and favourites, in an upper chamber overlooking the street, and his eye fell on me; so he took pity on my case and sending one of his servants to fetch me to him, said to me, "Sell thy beans to my people." So I began to mete out the beans with a measure I had with me, and each who took a measure of beans filled the vessel with gold pieces, till the basket was empty. Then I gathered together the money I had gotten, and Jaafer said to me, "Hast thou any beans left?" "I know not," answered I and sought in the basket, but found only one bean. This Jaafer took and splitting it in twain, kept one half himself and gave the other to one of his favourites, saying, "For how much wilt thou buy this half-bean?" "For the tale of all this money twice-told," replied she; whereat I was confounded and said in myself, "This is impossible." But, as I stood wondering, she gave an order to one of her handmaids and the girl brought me the amount twice-told. Then said Jaafer, "And I will buy my half for twice the sum of the whole. Take the price of thy bean." And he gave an order to one of his servants, who gathered together the whole of the money and laid it in my basket; and I took it and departed. Then I betook myself to Bassora, where I traded with the money and God prospered me, to Him be the praise and the thanks! So, if I give thee a thousand diners a year of the bounty of Jaafer, it will in no wise irk me.' Consider then the munificence of Jaafer's nature and how he was praised both alive and dead, the mercy of God the Most High be upon him!