Fred Phelps was an inspirational civil rights crusader before he gained worldwide notoriety for a phase so hateful and extreme—"God hate fags"—it tested the limits of the First Amendment. Phelps, 84, died late Wednesday. His evil crusade somehow made us better.

As a leading civil rights lawyer, Phelps took on "the Jim Crow establishment" in Topeka, Kan., a city forced to desegregate schools by the Supreme Court's landmark decision in Brown v. Board of Education.

I interviewed a deputy district attorney in Topeka who was fired for being black by his newly elected boss. He wept, thanking Phelps for rectifying the matter. Phelps took cases that leveled the playing field for professional women. He was a formidable, crusading lawyer who cared little about self and much about justice for oppressed demographics. As a young adult, he was the sunflower state's modern John Brown.

I first met Phelps, a dyed-in-the-wool Democrat, as he rode a bicycle through Kansas in a bid to win his party's nomination for governor in 1990. Something wasn't right. He talked about seeking office to help families and minorities. Then he segued into his real concern. Homosexuals had taken over state government, Phelps insisted. As governor, he would stop them. It was an odd and paranoid agenda from a man who otherwise helped people marginalized by society.

Phelps was the father of 13 kids, many of whom became lawyers and worked in Phelps Chartered law firm. A Baptist minister, Phelps founded the Westboro Baptist Church. Members of the church and law firm devote their time, and millions of dollars, to protests that taunted the LGBTQ community and families grieving service personnel killed in action.

He made his first big splash in the national media by protesting the funeral of Matthew Shepard, a gay college student beaten to death in Wyoming in 1998.

I developed a morbid fascination with the transformation of a civil rights crusader into the leader of a cult that advocated hate. Phelps called me when I worked for a wire service in Washington, D.C., saying he and his church would picket the LGBTQ march on Washington in 1993. He wanted coverage. As I interviewed Phelps during the parade along Pennsylvania Ave., dozens of gay and lesbian activists posed for pictures with him. He cooperated and smiled for the camera. Later, one marcher ran toward the Phelps clan and sprayed them with Mace. I thought the senior Phelps would eventually get shot.

Though Phelps hurt people, he became an unlikely asset to the LGBTQ community. He was a standalone public relations campaign the gay rights movement could not have afforded.

With colorful signs that minced no words, Phelps brought out the best in Americans. They didn't want any part of the extreme intolerance he peddled. They preferred to counter his message. Even those with deep moral objections to homosexuality did not wish to share a platform with extreme bigots on display. It was just too ugly.

"Fred Phelps has caused many people enormous amounts of agony," wrote Alyssa Rosenberg, in the Washington Post. "But in doing so, he played a critical role in defining the choice between hatred and acceptance, and in accidentally expanding the tolerance of the very people he feared so much."

We might expect Shepard's mother to express revulsion at the mention of Phelps. Here's what she told LGBTQ Nation a few years back: "Oh, we love Freddy. If it wasn't for him there would be no Matthew Shepard."

His cult's protests exploited freedom of speech to the point of endangering it. What didn't weaken the First Amendment, it turns out, strengthened it. In Snyder v. Phelps, Supreme Court justices held their noses and sided with Westboro Baptist in 2011. They said demonstrators on public property cannot be liable for causing emotional distress, even if the speech is "outrageous."

The Phelps spectacle has led me to ponder madness. Maybe his demonstration fetish was Machiavellian political theater designed to enhance civil rights—the magnum opus of a disbarred lawyer who could no longer practice in court. But that's conspiratorial claptrap. More likely, something snapped and the man went crazy. Maybe he spent too much time on a bike under the blazing sun. By marketing hate, he caused society to reject a grotesque message and the courts to protect it. By God's will, the journey of Fred Phelps taught us to hate a bit less and love a bit more.