Abu Hurairah reported,

The Messenger of Allah ﷺ said, "A man may work for a long time with the deeds of the people of Paradise, then his deeds are sealed with the deeds of the people of the Fire. And a man may work for a long time with the deeds of the people of the Fire, then his deeds are sealed with the deeds of the people of Paradise."

Azami 1045

Sahih

عن أبي هريرة

أن رسول الله ﷺ قال: إن الرجل ليعمل الزمن الطويل بعمل أهل الجنة، ثم يختم له عمله بعمل أهل النار. وإن الرجل ليعمل الزمن الطويل بعمل أهل النار، ثم يختم له عمله بعمل أهل الجنة.

الأعظمي 1045صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Faith
Chapter
Belief in the divine decree and predestination
Section
Actions are judged by their endings
Numbering
Jami al-Kamil 1045 (2nd edition)
Azami 1045