Hadithcore
Sahih al-Bukhari, 6440
sahih

'Ubayy said <i>(referring to the hadith above)</i>, "We considered this as a saying from the Qur'an till the Surah (beginning with):

"The mutual rivalry (for piling up of worldly things) diverts you' (102:1) was revealed."

وَقَالَ لَنَا أَبُو الْوَلِيدِ حَدَّثَنَا حَمَّادُ بْنُ سَلَمَةَ، عَنْ ثَابِتٍ، عَنْ أَنَسٍ، عَنْ أُبَىٍّ، قَالَ كُنَّا نَرَى هَذَا مِنَ الْقُرْآنِ حَتَّى نَزَلَتْ ‏{‏أَلْهَاكُمُ التَّكَاثُرُ‏}‏

References2 variants
In-Book Reference
Book 81, Hadith 29
USC-MSA web (English) reference
Vol. 1, Book 76, Hadith 447 (deprecated numbering scheme)