Disclosed are compounds of formula (I): formula (I) and pharmaceutically acceptable salts thereof. The compounds of the invention are BDII- selective inhibitors of BET proteins, and have therapeutic potential for treating cancer, acute kidney disease, and viral infections, among other diseases.