Last week, a story began circulating in the media about five conservative churches that were subpoenaed in Houston and ordered to turn over any sermons they had delivered about gay rights (along with a lot of other material).

Religious Right groups went ballistic. It often turns out in cases like this that what’s really going is less horrifying than the far right would have you believe. In this case, it turns out they actually had a point.

Some background: Houston officials in May passed an ordinance protecting LGBT rights. The Houston Equal Rights Ordinance (HERO) is controversial in part because it gives transgender individuals the right to use the restroom of their choice in public buildings and businesses. (Religious entities are exempt.)

Conservative Christians don’t like HERO and are seeking to overturn it via a ballot referendum. To get the matter on the ballot, opponents had to collect about 16,000 signatures. They collected 50,000, but there were problems with many of them. A huge number of signatures were rejected, and the measure failed to qualify for the city ballot.

Opponents sued. In court, they are claiming that Mayor Annise Parker and other city officials used inappropriate methods to exclude many of the signatures. In response, city officials subpoenaed the five churches.

The five pastors subpoenaed certainly opposed HERO, and some of them have a history of saying ugly things about LGBT people. They also loathe Parker in part because she is a lesbian.

The rhetoric of these pastors may be nasty, and they may be unpleasant people who launch crude attacks on gays – but that’s not illegal, just boorish. The pastors aren’t parties to the lawsuit. The legal challenge is being brought by two other pastors, a Republican Party official and a city resident.

Nor is it illegal for houses of worship to take part in ballot referenda. Under federal law, churches are prohibited from endorsing or opposing candidates for public office, but taking stands on ballot initiatives is permitted. Americans United, which has the same federal tax-exemption as houses of worship, is bound by identical rules. We can’t endorse or oppose candidates, but we can get involved in ballot questions. We do it frequently and have worked in many states to oppose voucher referenda at the ballot box.

The pastors’ anti-gay sermons, while ugly, are protected speech. The churches are allowed to intervene in a ballot issue and collect signatures. So what was the city after here?

It’s hard to say. The scope of the subpoenas was very broad. Moderate evangelical blogger Warren Throckmorton listed everything that was requested. It’s quite extensive.

Lawyers often use these types of aggressive tactics for individuals who are direct parties to a lawsuit, but since these pastors aren’t parties, this looked like an overreach. The demand to see the pastors’ sermons struck many as especially audacious.

Facing criticism, officials in Houston began backing down. They admitted that the subpoenas were overly broad and even tried to pin the blame on a pro bono attorney who, they said, acted without the mayor’s consent.

To be clear, churches can certainly be subpoenaed in lawsuits. And a pastor can be made to turn over a sermon under certain circumstances. If authorities believe a religious leader has advocated illegal activity from the pulpit, they have every right to investigate that.

In this case, city officials didn’t seem to know what they were looking for. By issuing subpoenas that demanded everything but the kitchen sink, the officials overreached and hurt their own case. Reportedly, they have now narrowed the subpoenas to exclude sermons and are instead requesting specific documents and materials that are directly tied to the signature-collection campaign. That’s what they should have done from the get-go. Now, I fear the damage is done.

The officials have handed the Religious Right an incredible public relations victory. As journalist Sarah Posner pointed out in a story headlined, “Houston’s Pastor Subpoenas: A Meme Made for Fox News,” this incident has become fodder for the Religious Right’s “we’re being persecuted” campaign. Virtually every Religious Right group is using it to raise money and stir up activists.

Posner, referring to a group called the U.S. Pastors Council that has exploited the incident, wrote, “It’s almost as if the city of Houston wanted to help the Pastors’ Council raise money.”

Indeed. At the end of the day, that’s what’s so unfortunate about the city’s misstep: These subpoenas will launch a thousand right-wing fund-raising letters.