Cheri Andes awoke one morning in March 2004 to disconcerting news. An article in The Boston Globe described the growing debate on same-sex marriage in Massachusetts, where the legislature was about to take up the issue for the second time. And in the article, Ms. Andes found two familiar names on irreconcilable sides of the issue.

The Rev. Jennifer Mills-Knutsen, assistant minister of Old South Church in Boston, endorsed such marriages with the words, “This is a civil rights issue.” The Rev. Hurmon Hamilton, pastor of Roxbury Presbyterian Church, told The Globe that same-sex marriage was not “a solution.”

What the article did not explain, but what Ms. Andes knew all too well, was that the two ministers also happened to be co-chairwoman and co-chairman of the Greater Boston Interfaith Organization, a coalition of congregations for which Ms. Andes was the lead organizer.

At the same moment that Ms. Mills-Knutsen and Mr. Harmon were becoming public antagonists on same-sex marriage, they were supposed to be allies in the interfaith group’s campaign to improve working conditions for nursing-home employees in the Boston area.

Or, to put it differently, faith’s straight line defies the secular grid that so many politicians and journalists try to impose upon religious communities: that they be unswervingly Democratic or Republican, liberal or conservative, left or right.

Since the vote on Proposition 8 in California, it has been the turn for liberals to bewail and conservatives to gloat that a large number of black Christians and Latino Catholics and Pentecostals who supported Barack Obama for president simultaneously cast their ballots to strike down same-sex marriage.

The only surprise, in truth, is that anybody should be surprised that theology refuses to adhere to a partisan platform.

“Religion is a lot messier than a lot of us want to consider,” Diane Winston, a professor of religion and media at the University of Southern California, said in a phone interview. “It’s easier to have neat guidelines. It’s easier to think that if you’re conservative in one area, you must be conservative in all areas. But religion doesn’t often cut that way.”

Consider, for example, Pope Benedict’s homily at Yankee Stadium in April with its ringing support for immigrants, a position that is practiced on a daily basis in Catholic parishes across the country. Under the routine type of analysis, the pope’s speech was a stunning deviation from the Roman Catholic Church’s (and his own) supposed conservatism.

Yet the church’s stand on behalf of immigrants, like the stands American bishops have taken over the past quarter-century against nuclear arms, the death penalty and President Bill Clinton’s welfare-reform bill, would strike a believing Catholic as entirely consistent.

An error has occurred. Please try again later.

You are already subscribed to this email.

In fact, the latest version of the bishops’ document, “Forming Consciences for Faithful Citizenship,” makes the case for a theology that advocates on behalf of the weak, both the unborn and the born.

The Democratic convention in August offered another example of the ways religious belief confounds political loyalty oaths. At a “faith caucus” organized by the Obama campaign, the speakers included the Rev. Charles Blake, presiding bishop of the Church of God in Christ, a black Pentecostal denomination.

Within the same sermon, Mr. Blake denounced the Democrats for supporting abortion rights, calling for outright resistance, and then turned his wrath against Republicans for being “silent if not indifferent” to social injustice. And both parts of the preaching were avidly received by the audience.

Had commentators been paying attention, Mr. Blake’s exhortation could have practically served as a prelude to the way many of his followers in California, where the Church of God in Christ is especially strong, split their tickets on Election Day between Mr. Obama and “Yes” on Proposition 8. But if the standard view of the black church is that it is always liberal, based on its civil rights activism and Democratic voting habits, then this wellspring of social conservatism seemed to be some kind of shock.

The mistake of conflating religious doctrine with partisan allegiance traces back in some ways to the early 1980s and the emergence of the Rev. Jerry Falwell’s Moral Majority, and more broadly to what came to be known as the Religious Right, as a key constituency in President Ronald Reagan’s electoral triumphs.

“That skewed our understanding,” said John J. De Iulio, a professor of politics, religion and civil society at the University of Pennsylvania. “People overgeneralized from the shift of evangelical Christians into the Republican fold. The idea took hold that if people derive a particular set of views from their religious identities, then it translates into a partisan or ideological identity, and then you must share all the views that come up. And obviously that’s not so.”

The range of positions may be most apparent these days within evangelical circles. Particularly in the younger generation, these supposedly hidebound conservatives have taken up causes like environmentalism (known in evangelical parlance as “creation care”) and economic injustice (borrowing the Catholic term “sinful inequalities”) as well as Darfur and the reform of mandatory minimum sentences for nonviolent drug offenders.

Just this week, Richard Cizik resigned as the Washington lobbyist for the National Association of Evangelicals in the face of criticism for having endorsed civil unions for gay couples in a radio interview. The fact that Mr. Cizik took the stand at all, though, serves notice that the old categories fail at explaining the present reality.

In Boston, Ms. Andes grasped that point back in 2004.

With some delicate internal diplomacy, she kept the interfaith group from fracturing over legislation on same-sex marriage, and it won protections for the nursing home workers, the issue on which there was unanimity.

“I don’t think we minimized the differences we felt,” Ms. Andes recalled. “But we got to the point where we could see them through a glass wall instead of putting up a brick wall.”

E-mail: sgfreedman@nytimes.com

A version of this article appears in print on , on Page A14 of the New York edition with the headline: Faith-Based Views Veer Off a Straight Political Line. Order Reprints|Today's Paper|Subscribe