You probably remember the story of King Solomon and the baby. Two women come before the monarch claiming to be a child's mother. Neither has evidence to show. So Solomon proposes the following: He'll cut the baby in half. Each woman will receive an equal share. This will be equitable, if a bit messy.

On the face of it, the king was either a baby-hating madman or an idiot. Killing an infant and divvying up its corpse hardly seems like a reasonable response to a maternity dispute. But if you know the story, you know what Solomon had in mind: The baby's true mother would rather sacrifice her child's custody than her child's life. She would turn down the king's proposal, and then he would award the baby, in its entirety, to her.

We can learn a couple of things from Solomon. First, judicial procedures that seem downright stupid may in fact be very wise. Second, when "ordinary" evidence is lacking, judicial officials may still be able to get to the bottom of things by creating clever rules—even ones that are based on a lie ("when maternity is in doubt, cut the child in half "). Such clever rules can manipulate people's incentives, leading them to reveal information only they have access to through the choices they make.

Burn, Baby, Burn

"Ordeals" were medieval European judicial officials' version of splitting the baby. From the ninth through the 13th centuries, two types flourished: hot and cold.

In a hot water ordeal, a priest boiled a cauldron of water into which he threw a stone or ring. The task of the "proband"—the ordeal taker—was, as Bishop Eberhard of Bamberg's 12th century breviary instructed, to "plunge his hand into the boiling water" and pluck it out. Afterwards his hand should "be immediately sealed up." If he's innocent, he'll "bring forth his hand safe and unharmed from this water. But if he be guilty and presume to plunge in his hand," it will show burn injuries on inspection three days later.

The hot iron ordeal was similar, except the proband carried a piece of burning iron nine paces instead. The formula for deciding guilt was the same: If it burns you, you did it.

The cold water ordeal dispensed with the hot stuff in favor of a tepid pool. The ninth century theologian Hincmar of Rheims described it this way: "He who is to be examined by this judgment is cast into the water bound, and is drawn forth again bound." If he's guilty and "seeks to hide the truth by a lie," he "cannot be submerged." In other words, guilty people float. Innocent people sink.

Medieval law reserved ordeals for certain kinds of cases, typically those involving accusations of serious crimes, such as homicide, robbery, or arson. Punishments for failing them ranged from fines to mutilation to death.

The law also reserved ordeals for cases that judges couldn't confidently decide without them. "The ordeal of hot iron is not to be permitted except where the naked truth cannot otherwise be explored," 12th century English law decreed. Or as 13th century German law put it, "It is not right to use the ordeal in any case, unless the truth may be known in no other way."

If a defendant confessed or reliable witnesses testified against him, judges would convict him straightaway, without an ordeal. If enough acceptable "oath helpers" swore his innocence, he would be acquitted. But when such "ordinary" evidence was silent, judges unwilling to convict or exonerate accused criminals indiscriminately needed another way to determine how to rule. That way was ordeals.

These were justified on the grounds that they were iudicia Dei—judgments of God. Where man couldn't correctly assign criminal status, he recruited the Lord. "The judges may decide that which they clearly know," a Carolingian capitulary directed, "but that which they cannot know shall be reserved for Divine judgment."

According to medieval Christian belief, if priests performed the appropriate rituals, God would reveal individuals' guilt by letting the boiling water or burning iron harm them or by making the holy water reject their guilty bodies; He would reveal their innocence by miraculously saving their limbs from harm or accepting their guiltless bodies into his blessed pool.

This may seem, well, stupid. But similar to King Solomon's baby-dicing idea, lurking below was a good deal of wisdom.

The Secret Solution

Contrary to what you might expect, ordeals exonerated the majority of people who underwent them. That's right: Boiling water rarely boiled those who put their hands in it, and burning iron rarely burned those who carried it.

"If we suppose that few or none escaped conviction who exposed themselves to these fiery trials," the historian Robert Henry warns, "we shall be very much mistaken. For the histories of those times contain innumerable examples of persons plunging their naked arms into boiling water, handling red-hot balls of iron, and walking upon burning ploughshares, without receiving the least injury."

The Regestrum Varadinense, an ordeal register from Várad, Hungary, records the outcomes of 208 hot iron ordeals administered by clerics in the basilica of Nagyvárad between 1208 and 1235. Probands passed in 130 cases, or 62.5 percent of the time. Unless nearly two-thirds of ordeal-officiating priests didn't understand how to heat iron, something funny must've been going on.

Another source for ordeal outcomes is the English plea rolls, which were kept by the royal courts between 1194 and 1219. These contain outcomes for just 19 probands, but they point to the same phenomenon. Sixteen defendants underwent cold water ordeals; 14 passed. All three defendants who underwent hot iron ordeals were unscathed, too. Here, ordeals exonerated their takers 89 percent of the time.

Consider a medieval fellow named Frithogar. Suppose his neighbor, a farmer, accuses him of stealing. Frithogar denies it. The farmer has no witnesses but is well respected. Frithogar isn't, so the court orders him to the hot water ordeal.

Frithogar believes in iudicium Dei—that priests, by performing the appropriate rituals, can get God to reveal the truth, performing a miracle that prevents the boiling water from burning him if he's innocent, letting him burn if he's not.

What will Frithogar do?

Suppose he stole from the farmer. He knows he's guilty, but nobody else does. In this case, if Frithogar undergoes the ordeal, he expects to burn. Moreover, he expects to suffer the legal punishment for theft upon being convicted—a large fine.

His other option is to decline the ordeal, confessing his crime or settling with the farmer instead. Both of these alternatives punish Frithogar, but neither is as punishing as the fine for stealing, and neither will burn him. Thus, if he's guilty, he will choose to decline the ordeal.

Now suppose that Frithogar didn't steal from the farmer. He knows he's innocent, but nobody else does. In this case, if Frithogar undergoes the ordeal, he expects to pull his arm from the boiling water unburned. Moreover, he expects to avoid legal punishment upon being exonerated. If Frithogar declines the ordeal and confesses or settles instead, he suffers punishment for a crime he didn't commit. Thus, if he's innocent, he will choose to undergo the ordeal.

According to medieval Christian belief, God would reveal individuals' innocence by miraculously saving them from harm. This may seem, well, stupid. But similar to King Solomon's baby-dicing idea, lurking below was a good deal of wisdom.

The specter of the ordeal sorts Frithogar by his guilt or innocence. Leveraging his belief in iudicium Dei incentivizes him to choose one way if he hasn't stolen from the farmer and another way if he has, revealing his criminal status through how he chooses. This is similar to the way that King Solomon leveraged the specter of cutting the baby in half to incentivize the disputing women to reveal their true maternal status.

Of course, ordeals work only if they exonerate those who undergo them. But as you already heard, that's exactly what they did in most cases.

Rigging the System

Short of genuine iudicia Dei, how can boiling water be made innocuous to human flesh? By iudicia cleri. Because of the way ordeals sorted the accused, the clerics who administered them went in knowing that willing probands were innocent. They could therefore fix the tests to find the "correct" result.

Let's say Frithogar is innocent and thus chooses to undergo the ordeal. The cleric can lower the water's temperature so it doesn't burn him. Frithogar plunges his arm into the cauldron expecting to be unharmed, and his expectation is fulfilled—not by God but by an informed priest.

To rig ordeals, priests required latitude. And plenty was given to them by ordeal instructions, prescribed by liturgical ordines (directions for religious services) and royal dooms (the laws of the land). Consider the instructions for conducting the hot iron ordeal from 10th century England:

"We enjoin in the name of God and by the command of the archbishop and of all our bishops that no one enter the church after the fire has been brought in with which the ordeal is to be heated except the priest and him who is to undergo judgment.…Then let an equal number from both sides enter and stand on either side of the judgment place along the church.…And no one shall mend the fire any longer than the beginning of the hallowing, but let the iron lie on the coals until the last collect…and then let the hand with which he is about to carry the iron be sprinkled, and so let him go" to the ordeal.

Several features of these instructions seem fishy. First, only the priest and proband are initially allowed in the church. This gives the priest an opportunity to manipulate the ordeal fire, and hence the temperature of the iron. The doom indicates that before the proband begins the ordeal, "two men from each side go in and certify that [the iron] is as hot as we have directed it to be." But the priest's isolation until this point allows him to defraud the certifiers—for example, by providing them with a different iron for inspection than he provides the proband.

Second, the instructions forbid mending the fire after the communion consecration. The iron has to remain on dying coals until the priest makes his final prayer. This seems strange too—unless, of course, the goal is to give clerics a chance to let the ordeal iron cool before the proband handles it. If the priest fails to cool the fire or switch the iron, he can do just that by drawing out the final prayer.

Third, the ordeal instructions require observers to align along the church's walls for the ordeal's duration. In a reasonable-sized church, this puts them a considerable distance from the ordeal "stage," facilitating priestly chicanery.

Finally, the instructions direct the priest to sprinkle the proband's hand with holy water immediately before he carries the iron. It's easy to imagine how "sprinkling" could become dousing under a manipulative priest's control. The water helps offset any injurious heat remaining on the iron that fire fixing or iron tampering doesn't address.

Ordeal formulas also granted clerics discretion in deciding ordeal outcomes. They directed that the proband's "hand be sealed up, and on the third day" for the priest to examine "whether it is clean or foul within the wrapper." But they were silent about what it meant for a hand to be "clean or foul." That depended on the priest's judgment. A severely burned arm that when unwrapped looked like Freddy Krueger's face would certainly qualify as "foul" to any disinterested onlooker. But for the many degrees of foulness short of this state, the priest had leeway to declare the proband's innocence.

Cold water ordeal instructions gave priests opportunity for manipulation, too. While priests couldn't manipulate the density of water (well, not easily, anyway), they could control outcomes through other avenues, such as their authority to grade pass or fail.

A Carolingian capitulary describing cold water ordeals required a knot to be made in the rope attached to the proband at a prescribed length from his body, defining the depth to which he had to sink to prove his innocence. It also required the proband to be lowered gently into the water to prevent splashing. Still, scope for priestly discretion remained. Whether a proband had indeed sunk to the "depth of innocence" could be ambiguous. And cold water ordeal formulas didn't specify how long he had to spend at that depth to prove himself.

A priest could improve the chance that his proband would sink by directing him to exhale before entering the water. In fact, he could do better: Order the proband to fast for several days in holy preparation for the trial—a sort of medieval Gas-X, which made him more likely to sink.

Now, a corrupt cleric could abuse his powers of ordeal administration to sell a judicial verdict. But there was a check on priestly corruption. Priests worked for bishoprics whose revenues depended on judicial honesty.

Bishopric owners exercised the rights of local governments, including collecting taxes connected directly to local productivity. If crime was higher, resident productivity would be lower and bishopric revenues would suffer. Bishopric owners therefore had an incentive to limit activities that undermined productivity, such as priestly corruption. Their ability to do so was imperfect. Still, by controlling the selection of clerical administrators in their territories and these individuals' finances, bishopric owners could exercise at least some oversight.

What About Skeptics?

If defendants aren't completely sure that ordeals are genuine judgments of God, things get a bit more complicated. A 100 percent acquittal rate might seem suspicious to some. In fact, people may have been skeptical about ordeals for other reasons as well. The presence of observers, for instance, suggests that some medieval citizens at least entertained the idea that ordeal outcomes could reflect worldly influences in addition to otherworldly ones.

This poses a potential problem. Innocent skeptics may decide they don't want to hazard ordeals because they fear the possibility that boiling water will boil them or burning iron will burn them. If everyone passes, this fear disappears. But then guilty skeptics may decide they want to hazard ordeals instead. In both cases, the sorting breaks down, destroying the ability of ordeals to distinguish the guilty from the innocent.

But surely people clever enough to come up with the idea of using ordeals to sort criminal defendants in the first place wouldn't let this get in the way of their ability to do so. Ordeal-administering priests had a simple solution to the problem of skeptics: Condemn some probands.

It turns out that as long as defendants possessed even the faintest faith in the possibility that ordeals were genuine judgments of God, there existed some proportion of probands whom priests could condemn that would accomplish this goal. The more skeptical people were that ordeals were iudicia Dei, the more probands priests had to condemn to save the sorting feature of ordeals. The less skeptical people were, the fewer they could get away with condemning.

The probands whom priests had to condemn in this case were, of course, innocent ones—since innocents are the only people willing to undergo ordeals when they're sorting properly. This too poses a problem.

When priests don't have to condemn any innocent people, ordeals reinforce people's belief that they're legit. The guilty always decline ordeals, so their belief in iudicium Dei is never challenged; the innocent always undergo ordeals and are exonerated, so their belief is always fulfilled. But when priests have to condemn some innocent people, this is no longer true. Some probands now have experiences that contradict their belief that ordeals are iudicia Dei—they know they're innocent, but the ordeals they undergo say otherwise.

This problem, however, was minor. After all, what could an innocent person condemned by an ordeal do? Proclaim his innocence and tell everyone that ordeals are a sham? Maybe. But this is the same thing a truly guilty person would do, so no one's belief is affected. Exploit his knowledge that ordeals are a sham by committing crimes and hoping to be sent to them? I doubt it. But suppose he did: Now he repeatedly confronts the priest, who becomes suspicious and condemns him, foiling his plan.

The real potential danger wasn't that innocent people would tattle or become career criminals. It was that events would contradict ordeal results. One medieval defendant who was accused of murder, for instance, underwent an ordeal, failed, and was hanged. A few weeks later the man he murdered came home.

Such incidents threatened to initiate a process that could destroy the operation of ordeals. An occasional contradictory incident could be explained away, but belief that ordeals were iudicia Dei would weaken considerably if failures were frequent.

But they weren't, for two reasons. First, the cases in which judges used ordeals militated against such situations. Those cases, recall, were when ordinary evidence was lacking. The prospect that evidence would come back later to contradict ordeal results was therefore slim.

Second, medieval citizens' belief that ordeals were iudicia Dei was strong, so priests didn't have to condemn many probands to ensure that ordeals sorted properly.

Why were the folks of the day believers? Well, citizens of that time tended to be the religious kind. Ordeal ceremonies capitalized on this and were arranged to access and remind probands of their religious beliefs.

One way they did so was by rendering ordeals explicitly religious—nearly sacramental, in fact—rituals. "The Church," historian Henry Lea points out, "followed the policy of surrounding [ordeals] with all the solemnity which her most venerated rites could impart." Priests administered ordeals in churches as part of ordeal Masses. "After the celebration," one set of instructions read, "let the priest go with the people to the place of the ordeal, the Gospel in his left hand, the cross, censer and relics of the saints being carried ahead, and let him chant seven penitential psalms with a litany."

Even the mechanics of iudicia Dei in ordeals were grounded in citizens' religious beliefs. In the hot water ordeal, Hincmar informs us, "The guilty are scalded and the innocent are unhurt, because Lot escaped unharmed from the fire of Sodom." In the cold water ordeal, the guilty float because anyone who "seeks to hide the truth by a lie, cannot be submerged in the waters above which the voice of the Lord God has thundered."

As Lea put it, "In those ages of faith, the professing Christian, conscious of guilt, must indeed have been hardened who could undergo the most awful rites of his religion, pledging his salvation on his innocence, and knowing under such circumstances that the direct intervention of Heaven could alone save him from having his hand boiled to rags, after which he was to meet the full punishment of his crime, and perhaps in addition lose a member for the perjury committed."

Given the importance of religious belief to the operation of ordeals, it should come as no surprise that when the Church's support for them ended, ordeals did too. That didn't happen until the 1200s, but the road to the demise of ordeals was already being paved a century earlier.

Lie-detector tests are bullshit. The scientific community overwhelmingly rejects their validity. But if people believe polygraphs can discover whether someone is lying or telling the truth, they facilitate sorting in the same way as ordeals.

High-ranking ecclesiastics began to seriously question the relationship of ordeals to their religion in the 12th century. Critics of ordeals argued that they lacked scriptural support. The Bible contains but one instance of what might be construed as an actual judicial ordeal: In the Book of Numbers, an accused adulterer undergoes an ordeal of bitter waters—poison ingestion—to prove her fidelity. And medieval ordeals didn't use bitter waters.

A still bigger problem, the critics charged, was that ordeals violated an important Christian proscription with plenty of scriptural support: "Thou shalt not tempt the Lord thy God." Yet trials of fire and water required priests to command the Almighty to perform miracles at their whim.

These factors led the Fourth Lateran Council to reject ordeals' legitimacy in 1215 and ban priests from participating in them. No longer sanctioned by religion, trials by fire and water became useless for sorting criminal defendants, and judicial systems abandoned them.

A Modern Incarnation

It wouldn't make sense for America to use medieval-style ordeals because (1) technological advances have made fact finding infinitely cheaper than it once was, and (2) most of us don't believe that trials of fire and water are iudicia Dei. But under less technologically advanced conditions, for people who did have such belief, ordeals could be a sensible option even today. In fact, where these conditions prevail, people continue to rely on them—in Liberia, for example.

Liberia, if you're not familiar, is a political-economic basket case. Its government is corrupt, its public judicial institutions are dysfunctional, its people are impoverished, and a large portion of them have strong superstitions supporting the effective use of judicial ordeals. Enter sassywood.

In fact, sassywood is a catchall term for a variety of medieval-style ordeals currently in use there, including hot water and hot iron ordeals. The sassywood ordeal, however, is trial by poison ingestion. It takes its name from the concoction that criminal defendants in Liberia are asked to drink, made from the toxic bark of the Erythrophleum suaveolens tree.

Like medieval ordeals, sassywood is reserved for important crimes in difficult cases, where ordinary evidence is lacking. Accused criminals can respond to the charges against them by confessing their guilt or proclaiming their innocence. In the latter case, they're invited to undergo sassywood.

A spiritual leader mixes the brew, administers it, and acts as the trial's judge. The defendant's physiological reaction to imbibing the potion decides his guilt or innocence: "If the drinker by vomiting throws up all the [poison] before the sunrise the following morning or much more if he does it during the very trial then he is innocent and publicly declared not guilty of the crime for which he was accused. But if he should die on the spot," or display signs of intoxication, "then he is believed and proclaimed Guilty."

According to a widely held Liberian superstition, sassywood's power to correctly identify the drinker's criminal status resides in a spirit that "accompanies the draught, and searches the heart of the suspected individual for his guilt. If he be innocent, the spirit returns with the fluid in the act of ejection, but if guilty, it remains to do more surely the work of destruction."

Given the paucity of conventional evidence-gathering technologies, such as reliable police and government courts, there's little for residents to go on when criminal accusations are made. But given their superstitions, these communities can tap into defendants' private information about their guilt or innocence through ordeals. So that's exactly what they do.

Such practices aren't limited to Africa. America's legal system leverages superstition to improve its judicial outcomes, too. Our "ordeals" just have a fancier name: polygraph tests.

Better known as lie-detector tests, more than a dozen states permit polygraph results under certain circumstances as evidence in judicial proceedings. Police departments use lie-detector tests, the FBI uses them, even the CIA.

Lie-detector tests are bullshit. Like astrology, they have their supporters, but the scientific community overwhelmingly rejects their validity. There's about as much science supporting the idea that you can physiologically measure whether someone is lying or telling the truth by strapping them to one of those funny-looking machines as there is supporting the idea that God intervenes in trials of fire and water to reveal defendants' guilt or innocence.

Although lie-detector tests don't really discover whether people are lying or telling the truth, if people believe they do, they can facilitate sorting in the same way as ordeals.

The innocent believer has nothing to fear by taking a polygraph. He expects it to exonerate him, and therefore has an incentive to take the exam. The guilty believer fears being outed by the results. He expects to be condemned, giving him an incentive to refuse.

Polygraph administrators probably realize this, and they interpret the sophisticated-looking squiggly lines on the polygraph paper accordingly.

This works only if people hold the appropriate belief—that lie detectors are really capable of discovering whether they're lying or telling the truth. But lots of modern Americans who pride themselves on their scientific approach to life nevertheless heed this superstition. So law enforcement officials keep on truckin'.

Superstitious elements in modern America's legal system don't stop at the polygraph test. You can also find them in at least one other notable place: the courtroom.

Ever notice that movies depict people swearing an oath to tell the truth in God's name, even on the Bible, before testifying in court? That's not movie magic: Until relatively recently, God swearing was, and in some cases still is, customary in the United States. The country's religious history may be part of the reason for this. But a more important part may be the very same logic discussed above.

When testifying is voluntary, and testifiers have to swear before God to speak the truth, who do you think is more likely to provide testimony: truth tellers or bullshit artists? If people believe that swearing before God has real meaning—that God might punish them if they lie—the answer will be the former.

In fact, God swearing may produce more reliable testimony even when testifying is mandatory. If you have to swear to tell the truth in God's name before you testify, and you believe that God dislikes lying, you're going to think twice before committing perjury. God swearing helps the legal system weed out horse hockey.

This isn't to say most Americans think God will smite them if they lie after swearing to tell the truth in His name. But a few probably do. Given that the practice costs next to nothing to use, it's not hard to see why it would have some role in the courtroom.

Superstition, it turns out, can provide a useful foundation for securing criminal justice. And even clever people, it turns out, can believe in superstition.

Societies of superstitious but nevertheless clever people, past and present, have developed institutions that leverage their beliefs to incentivize fact finding. Beneath the strikingly senseless surface of medieval judicial ordeals, Liberian sassywood trials, and even American polygraph tests and courtroom God swearing, there's actually a lot of sense.

This article was adapted from WTF?! An Economic Tour of the Weird by permission from Stanford University Press. © 2017