Inhibitor of FXII/FXIIa for use in the prevention of the formation and/or stabilization of thrombi during and/or after a medical procedure performed on a human or animal subject comprising contacting blood of said human or animal subject with artificial surfaces, wherein said inhibitor of FXII/FXIIa is administered before and/or during and/or after said medical procedure, and further wherein (i) the artificial surface is exposed to at least 80% of the blood volume of the subject and the artificial surface is at least 0.2 m 2 or (ii) the artificial surface is a container for collection of blood outside the body of the subject or (iii) the artificial surface is a stent, valve, intraluminal catheter, or a system for internal assisted pumping of blood, wherein the FXII/FXIIa inhibitor comprises (i) the wild type Infestin-4 polypeptide sequence (SEQ ID NO: 1), or a variant thereof, wherein a variant comprises (a) the N-terminal amino acids 2-13 of the wild type Infestin-4 sequence and at least one and up to five amino acid mutations outside said N-terminal amino acids that result in differences from the wild type Infestin-4 sequence; and/or (b) six conserved cysteine residues from the wild type Infestin-4 sequence and a homology of at least 70% to the wild type Infestin-4 sequence. (ii) SPINK-1 (SEQ ID NO:2), which is mutated to include the N-terminal amino acids 2-13 of the wild type Infestin-4 sequence, or a variant of said mutated SPINK-1, wherein a variant comprises (a) the N-terminal amino acids 2-13 of the wild type Infestin-4 sequence; and at least one and up to five amino acid mutations outside said N-terminal amino acids that result in differences from the wild type SPINK-1 sequence and which increase the homology of the variant to the wild type Infestin-4 sequence; and/or (b) six conserved cysteine residues from the wild type SPINK-1 sequence and a homology of at least 70% to the wild type SPINK-1 sequence. (iii) an anti-FXII/FXIIa antibody, wherein the antibody binds to FXII/FXIIa and inhibits its activity and/or activation. (i) the artificial surface is exposed to at least 80% of the blood volume of the subject and the artificial surface is at least 0.2 m 2 or (ii) the artificial surface is a container for collection of blood outside the body of the subject or (iii) the artificial surface is a stent, valve, intraluminal catheter, or a system for internal assisted pumping of blood, (i) the wild type Infestin-4 polypeptide sequence (SEQ ID NO: 1), or a variant thereof, wherein a variant comprises (a) the N-terminal amino acids 2-13 of the wild type Infestin-4 sequence and at least one and up to five amino acid mutations outside said N-terminal amino acids that result in differences from the wild type Infestin-4 sequence; and/or (b) six conserved cysteine residues from the wild type Infestin-4 sequence and a homology of at least 70% to the wild type Infestin-4 sequence. (a) the N-terminal amino acids 2-13 of the wild type Infestin-4 sequence and at least one and up to five amino acid mutations outside said N-terminal amino acids that result in differences from the wild type Infestin-4 sequence; and/or (b) six conserved cysteine residues from the wild type Infestin-4 sequence and a homology of at least 70% to the wild type Infestin-4 sequence. (ii) SPINK-1 (SEQ ID NO:2), which is mutated to include the N-terminal amino acids 2-13 of the wild type Infestin-4 sequence, or a variant of said mutated SPINK-1, wherein a variant comprises (a) the N-terminal amino acids 2-13 of the wild type Infestin-4 sequence; and at least one and up to five amino acid mutations outside said N-terminal amino acids that result in differences from the wild type SPINK-1 sequence and which increase the homology of the variant to the wild type Infestin-4 sequence; and/or (b) six conserved cysteine residues from the wild type SPINK-1 sequence and a homology of at least 70% to the wild type SPINK-1 sequence. (a) the N-terminal amino acids 2-13 of the wild type Infestin-4 sequence; and at least one and up to five amino acid mutations outside said N-terminal amino acids that result in differences from the wild type SPINK-1 sequence and which increase the homology of the variant to the wild type Infestin-4 sequence; and/or (b) six conserved cysteine residues from the wild type SPINK-1 sequence and a homology of at least 70% to the wild type SPINK-1 sequence. (iii) an anti-FXII/FXIIa antibody, wherein the antibody binds to FXII/FXIIa and inhibits its activity and/or activation.