Q: In many countries, the law imposes interest on judgments or award of damages. Is such interest acceptable on account of dina d’malchusa?
A: Dina d’malchusa cannot permit something prohibited by the Torah. Thus, it cannot permit the ribbis between Jews (Rema, C.M. 369:11).
Nonetheless, some authorities consider one who willingly refuses to pay what he owes as a thief, and maintain that ribbis does not apply to compensation by a thief who caused loss (see Bris Yehudah, ch. 4)
Furthermore, some understand that interest imposed by external sources, not the lender or borrower, is not considered ribbis, and may be included in dina d’malchusa (see Rema, Y.D. 165:1; C.M. 74:7)
In addition, Biblically prohibited ribbis pertains only to interest on loans that was agreed upon beforehand by the lender and borrower. Other forms of interest are Rabbinically prohibited, which do not always have to be returned once paid (Y.D. 161:2, 5).
Thus, in certain cases, a person may be allowed to accept or keep court-imposed interest. A competent halachic authority should be consulted.