Hadithcore
Sahih al-Bukhari, 3167
sahih

Narrated Abu Huraira:

While we were in the Mosque, the Prophet (ﷺ) came out and said, "Let us go to the Jews" We went out till we reached Bait-ul-Midras. He said to them, "If you embrace Islam, you will be safe. You should know that the earth belongs to Allah and His Messenger, and I want to expel you from this land. So, if anyone amongst you owns some property, he is permitted to sell it, otherwise you should know that the Earth belongs to Allah and His Messenger."

حَدَّثَنَا عَبْدُ اللَّهِ بْنُ يُوسُفَ، حَدَّثَنَا اللَّيْثُ، قَالَ حَدَّثَنِي سَعِيدٌ الْمَقْبُرِيُّ، عَنْ أَبِيهِ، عَنْ أَبِي هُرَيْرَةَ ـ رضى الله عنه ـ قَالَ بَيْنَمَا نَحْنُ فِي الْمَسْجِدِ خَرَجَ النَّبِيُّ صلى الله عليه وسلم فَقَالَ ‏"‏ انْطَلِقُوا إِلَى يَهُودَ ‏"‏‏.‏ فَخَرَجْنَا حَتَّى جِئْنَا بَيْتَ الْمِدْرَاسِ فَقَالَ ‏"‏ أَسْلِمُوا تَسْلَمُوا، وَاعْلَمُوا أَنَّ الأَرْضَ لِلَّهِ وَرَسُولِهِ، وَإِنِّي أُرِيدُ أَنْ أُجْلِيَكُمْ مِنْ هَذِهِ الأَرْضِ، فَمَنْ يَجِدْ مِنْكُمْ بِمَالِهِ شَيْئًا فَلْيَبِعْهُ، وَإِلاَّ فَاعْلَمُوا أَنَّ الأَرْضَ لِلَّهِ وَرَسُولِهِ ‏"‏‏.‏

References2 variants
In-Book Reference
Book 58, Hadith 9
USC-MSA web (English) reference
Vol. 4, Book 53, Hadith 392 (deprecated numbering scheme)
Related hadiths6
Compare isnād across 6 related chains →