The book of Kings rarely spares a good word for King Ahab of the northern kingdom of Israel (reigned c. 874 to 853 BCE). He built a temple to Baal in Samaria, married Jezebel, and provoked the prophet Elijah to call a drought on the land that lasted three years (1 Kings 17). And yet 1 Kings 20 records that Ahab won a stunning military victory over Ben-Hadad, king of Aram, who had laid siege to Samaria and demanded, among other spoils, all of Israel's treasures including the Scrolls of the Torah.

The midrash, preserved as exemplum 282 in Moses Gaster's 1924 Exempla of the Rabbis, seizes on one verse: Ahab's refusal to hand over what Ben-Hadad demanded. The Rabbis identified the uncrossable line. Ahab would give Ben-Hadad silver, slaves, and wives. He would not give up the Scroll of the Law. Despite his deep personal idolatry, on this one point he drew the line of a Jew. For this alone, the tradition says, he was saved from the siege. One mitzvah, in the right place, outweighed years of idolatry in the balance of that particular war.

The same pattern repeats with Ahab's son Jehoram. 2 Kings 6 records that during a terrible famine in Samaria, when women were boiling their own children to eat, Jehoram tore his royal garment and revealed sackcloth underneath. He had been wearing the garment of a penitent next to his skin the whole time. When the king of Israel, for all his public wickedness, privately wrapped himself in sackcloth, God helped him against the foe. A secret mitzvah of humility carried the day.

This passage preserves a surprising rabbinic pattern. Even the worst kings of Israel, the Rabbis refuse to dismiss, because even they did one or two things right. Heaven remembers every single mitzvah, no matter who performs it. The Scroll Ahab would not surrender, and the sackcloth Jehoram wore in secret, were enough to shift the outcome of entire wars.