The Messenger of Allah ﷺ said, "Shall I not inform you of the greatest of the major sins?"We said, "Yes, Messenger of Allah."He said, "Associating partners with Allah, and disobedience to parents." He had been reclining, but then he sat up and said, "Beware! And false speech and false testimony. Beware! And false speech and false testimony."He kept repeating it until I thought he would never stop.
قال رسول الله ﷺ: ألا أنبئكم بأكبر الكبائر؟ قلنا: بلى يا رسول الله. قال: الإشراك بالله، وعقوق الوالدين وكان متكئا، فجلس، فقال: ألا وقول الزور وشهادة الزور، ألا وقول الزور وشهادة الزور فما زال يقولها حتى قلت: لا يسكت.
Bukhari related it in al-Adab (5976), and Muslim in al-Iman (87), both of them through the route of Saeed Jariri, who said, Abdul-Rahman bin Abu Bakra narrated to us, from his father, and he related it. The wording given here is Bukhari's.