It was narrated from 'Abdur-Rahman bin ‘Abdullah that his father Ibn Mas’ood said:
There was a man among those who came before you who had a kingdom; one day he thought and realised that it would come to an end and that what he had was distracting him from worshipping his lord. So he slipped out one night from his palace and went to the kingdom of someone else. He came to the shore and stayed there, making bricks for payment, and he ate and gave the surplus in charity. He continued like that until news of him and his worship and virtue reached their king. The king sent for him but he refused to go to him. He sent for him again and he refused to go to him, saying. What have I to do with him? So the king rode (to where he was), and when the man saw him he turned and fled. When the king saw that he pursued him but could not catch up with him. He cried out: O slave of Allah, you have nothing to fear from me. So he stopped and the king caught up with him and said: Who are you, may Allah have mercy on you? He said: I am So and so, the son of So and so, the ruler of such and such. I thought about my situation and I realised that what I had would come to an end and that it was preoccupying me and distracting me from worshipping my Lord. So I left it and came here to worship my Lord, may He be glorified and exalted. He said: You are not in greater need of what you did than me. Then he dismounted and let his mount go, and he followed him, and they stayed together, worshipping Allah, may He be glorified and exalted. They prayed to Allah and asked! Him to cause them to die together, and they died (together). He said: If I was in Rumailah in Egypt I would show you their graves as described to us by the Messenger of Allah (ﷺ).