A rabbi came to the Prophet ﷺ and said, "Muhammad," or "Abu Qasim, on the Day of Resurrection, Allah the Exalted will hold the heavens on one finger, the earths on one finger, the mountains and trees on one finger, the water and soil on one finger, and the rest of creation on one finger. Then He will shake them and say, 'I am the King, I am the King.'"The Messenger of Allah ﷺ laughed in amazement at what the rabbi said, affirming his words, then he recited, "They have not appraised Allah with true appraisal, while the earth entirely will be in His grip on the Day of Resurrection, and the heavens will be folded in His right hand. above what they associate with Him" [Zumar 39:67].
جاء حبر إلى النبي ﷺ، فقال: يا محمد- أو يا أبا القاسم- إن الله تعالى يمسك السماوات يوم القيامة على إصبع والأرضين على إصبع، والجبال والشجر على إصبع، والماء والثرى على إصبع، وسائر الخلق على إصبع، ثم يهزهن، فيقول: أنا الملك، أنا الملك، فضحك رسول الله ﷺ تعجبا مما قال الحبر، تصديقا له، ثم قرأ: {وما قدروا الله حق قدره والأرض جميعا قبضته يوم القيامة والسماوات مطويات بيمينه سبحانه وتعالى عما يشركون}.
Bukhari narrated it in the Tafsir (4811), and Muslim in the Description of the Resurrection, Paradise, and Hell (2786), both of them by way of Mansur, from Ibrahim, from Ubayda Salmani, from Abdullah bin Masud, who said, and then he related it. The wording given here is Muslim's.