In his “Letter from Birmingham Jail,” written behind bars 50 years ago this week, Martin Luther King invokes God 15 times and mentions the words “Christ” or “Christian” 21 times. But he refers to “law” 41 times — more than both of them combined — and thereby hangs a lesson.

King was a Baptist minister and a scholar of theology. He had come to Birmingham with the Southern Christian Leadership Conference to head a nonviolent protest against the city’s rigid segregation, and he wasn’t the only pastor jailed for disregarding a ban on civil rights demonstrations. In an open letter to the local paper, a group of white religious leaders had publicly criticized the sit-ins, warning that such “extreme measures” — which were “led in part by outsiders” — were apt to “incite … hatred and violence.” King read the ministers’ statement after he was arrested. “Letter from Birmingham Jail” was his response.

Addressing himself to “My dear fellow clergymen,” King explained that he had come to Birmingham “because injustice is here.” Like Paul of Tarsus carrying the Christian gospel “to the far corners of the Greco-Roman world,” he told them, “so am I compelled to carry the gospel of freedom beyond my own home town.” He described the protesters’ strategy of nonviolent confrontation as a long-delayed response to the refusal of Birmingham’s leaders to soften their city’s brutal and humiliating racial policies. “We had no alternative except to … present our very bodies as a means of laying our case before the conscience of the . . . community.”

King admonished the clergymen who criticized him as extremist. Jesus too had been an extremist, he argued. So had the Prophet Amos and the English preacher John Bunyan. There were times when it was wrong not to go to extremes, and this was one of them. A great struggle to end the nightmare of American apartheid was underway, he wrote, and it made him weep to see “white churchmen stand on the sideline and mouth pious irrelevancies and sanctimonious trivialities.”

King was the son, grandson, and great-grandson of preachers; such intensely religious language was normal for him. But King didn’t write only about God and theology. “Letter from Birmingham Jail” is also a powerful message about the law, and about the dangerous temptation to venerate law and the legal process as ends in themselves.

King’s response to the Alabama clergymen is justly renowned as a defense of civil disobedience. He depicted the casual cruelties of Jim Crow in language so affecting that even white Americans would understand why black civil rights could no longer wait. At the same time he insisted that civil disobedience was not a license for anarchy: “One who breaks an unjust law must do so openly, lovingly, and with a willingness to accept the penalty.” He had been arrested for doing something illegal — parading without a permit — but that didn’t mean he had no respect for the law. Far from it: One who disobeys a law on a matter of conscience and freely pays the penalty for doing so “is in reality expressing the highest respect for law.”

Yet it shouldn’t only be in the context of civil disobedience or the civil rights movement that we take to heart King’s caution about bowing to the law merely because it is the law. Too often the law is treated as a seal of approval or as a fetish or as a conversation-stopper: If that’s what the law says, that settles it.

Think of immigration restrictionists on the right who have insisted for years that nothing is more salient on the issue of illegal immigrants than the fact of their unlawful status. “When something is illegal, it’s illegal,” the late congressman Sonny Bono famously said. “Enforce the law.” Think, to take an opposite example, of the glee on the left when the Clinton administration tore the young Cuban refugee Elian Gonzalez from the home of his Miami relatives at gunpoint and forcibly sent him back to Cuba. The picture of that raid “warmed my heart,” Thomas Friedman exulted in his New York Times column. “This picture illustrates what happens to those who defy the rule of law.”

Law is indispensable to a civilized society. But the mindless enforcement of bad laws is not a substitute for decency or justice. Neither is mindless deference to those with political power (“When the president does it, that means it is not illegal,” Richard Nixon believed). Against such thinking, which is more common than many of us like to think, “Letter from Birmingham Jail” remains a powerful inoculation.