The present invention provides compounds of the general formula (I), their salts and N-oxides, and solvates and prodrugs thereof (wherein the substituents are as defined in the description). The compounds of the general formula (I) are inhibitors of factor XIa, and are useful in the prevention of and/or therapy for thromboembolic diseases.本發明提供通式(I)之化合物,彼等之鹽及N-氧化物,及其溶劑合物及其前藥(其中之取代基如說明中所定義)。通式(I)之化合物為XIa因子抑制劑,適用於預防及/或治療血栓栓塞症。