Hadith.3360 - It is narrated from Ali ibn Suwayd, who said:
I said to Abu al-Hasan al-Madhi عليه السلام (Imam Musa ibn Jafar Al-Kadhim عليه السلام): "These people call me to testify against my brothers."
Imam عليه السلام said: 'Yes, establish the testimony for them, even if you fear harm for your brother.'"
The compiler of this book, may Allah سبحانه وتعالى have mercy on him, said:
This is how I found it in my copy, and in another copy, I found it stated: 'If you fear harm for your brother, then do not testify.' Both meanings are close in interpretation.
The explanation is that if a disbeliever has a right over a believer and the believer is wealthy and capable of fulfilling it, then it is obligatory to establish the testimony against him, even if it causes financial loss. However, if the believer is in financial distress and the witness knows this, then it is not permissible for him to establish the testimony that could harm the believer by leading to imprisonment, displacement from his home, or the loss of his servant.
Likewise, it is not permissible for a believer to provide testimony that would lead to the killing of a believer in favor of a disbeliever. However, if the situation is different, then the testimony must be established because one of the attributes of a believer is that he does not betray his trust, whether among friends or by concealing testimony from enemies.