The Book of the Prohibited actions

Riyad as-Salihin · Chapter 263

Prohibition of Giving False Testimony

باب بيان غلظ تحريم شهادة الزور

Here the warning sharpens to its most severe. The Arabic title speaks of the ghilaz tahrim, the grave severity, of shahadat az-zur, false testimony. To lie under the weight of a testimony is not a small slip of the tongue but a sin the Prophet, peace be upon him, placed beside the very greatest.

Notice in the single hadith how he ranks it: alongside associating partners with Allah and disobedience to parents. Notice too his body language, sitting up and repeating the warning until his companions wished he would stop, so that no one could ever treat false witness as minor.

Hadith 1550

Abu Bakrah (May Allah be pleased with him) reported:

وعن أبي بكر رضي الله عنه قال‏:‏ قال رسول الله صلى الله عليه وسلم ‏:‏ ‏"‏ألا أنبئكم بأكبر الكبائر‏؟‏‏"‏ قلنا‏:‏ بلى يا رسول الله‏.‏ قال‏:‏ ‏"‏الإشراك بالله، وعقوق الوالدين‏"‏ وكان متكئا فجلس، فقال‏:‏ ‏"‏ألا وقول الزور‏!‏‏"‏ فما زال يكررها حتى قلنا‏:‏ ليته سكت‏.‏ متفق عليه‏

The Messenger of Allah (ﷺ) said, "Shall I not inform you of one of the gravest of the cardinal sins?" We said: "Yes, O Messenger of Allah!" He (ﷺ) said, "To join others as partners with Allah in worship and to be undutiful to one's parents." The Messenger of Allah (ﷺ) sat up from his reclining position (in order to stress the importance of what he was going to say) and added, "I warn you making a false statement and giving a false testimony. I warn you against making a false statement and giving a false testimony." The Messenger of Allah (ﷺ) kept on repeating this (warning) till we wished he should stop. [Al- Bukhari and Muslim]

In plain words

He placed false testimony beside the gravest sins, alongside associating partners with Allah and disobeying parents, and repeated the warning until the Companions wished he would stop. Lying under the weight of testimony is among the most serious of wrongs.

Reference : Riyad as-Salihin 1550 In-book reference : Book 17, Hadith 40