Formation of fibrin is critical for limiting blood loss at a site of blood vessel injury (hemostasis), but may also contribute to vascular thrombosis. Hereditary deficiency of factor XII (FXII), the protease that triggers the intrinsic pathway of coagulation in vitro, is not associated with spontaneous or excessive injury-related bleeding, indicating FXII is not required for hemostasis. We demonstrate that deficiency or inhibition of FXII protects mice from ischemic brain injury. After transient middle cerebral artery occlusion, the volume of infarcted brain in FXII-deficient and FXII inhibitor-treated mice was substantially less than in wild-type controls, without an increase in infarct-associated hemorrhage. Targeting FXII reduced fibrin formation in ischemic vessels, and reconstitution of FXII-deficient mice with human FXII restored fibrin deposition. Mice deficient in the FXII substrate factor XI were similarly protected from vessel-occluding fibrin formation, suggesting that FXII contributes to pathologic clotting through the intrinsic pathway. These data demonstrate that some processes involved in pathologic thrombus formation are distinct from those required for normal hemostasis. As FXII appears to be instrumental in pathologic fibrin formation but dispensable for hemostasis, FXII inhibition may offer a selective and safe strategy for preventing stroke and other thromboembolic diseases.