Compurgation, also called wager of law, is a defense used primarily in medieval law. A defendant could establish his innocence or nonliability by taking an oath and by getting a required number of persons, typically twelve, to swear they believed his oath.
Compurgation was found in early Germanic law, in Welsh law and in English ecclesiastical courts until the 17th century. In common law it was substantially abolished as a defense in felonies by the Constitutions of Clarendon in 1164. The defense was still permitted in civil actions for debt and vestiges of it survived in England until its final abolition in 1833.