By John Blake, CNN

(CNN) - Some people wonder if the black church will punish President Barack Obama for announcing support for same-sex marriage.

Here’s another question:

Why would the black church cite scripture to exclude gays when a similar approach to the Bible was used to enslave their ancestors?

“It’s so unfortunate,” says James Cone, one the nation’s most influential black theologians and author of “The Cross and the Lynching Tree.”

“The literal approach to scripture was used to enslave black people,” he says. “I’ve said many times in black churches that the black church is on the wrong side of history on this. It’s so sad because they were on the right side of history in their own struggle.”

Call it historical irony: Black church leaders arguing against same-sex marriage are making some of the same arguments that supporters of slavery made in the 18th and 19th centuries, some historians say. Both groups adopted a literal reading of the Bible to justify withholding basic rights from a particular group.

CNN’s Belief Blog: The faith angles behind the biggest stories

Opposition to gay rights is not the standard position of all black churches. Still, while several predominately white mainline denominations have officially accepted gays and lesbians in various forms, the vast majority of black churches still consider homosexuality a sin.

Black church leaders recently helped lead a successful drive to amend North Carolina’s constitution to ban same-sex marriage. The Rev. Fred Robinson, a black pastor in Charlotte, says most black churchgoers aren’t hypocrites. They take scripture, and sin, seriously.

“Black people are not confused,” Robinson says. “If you look at the scriptures that oppose homosexuality, Old and New Testament, they are clearer cut than the ones people used to justify slavery.”

Yet there are other factors beyond the Bible that shape the black church’s resistance to same-sex marriage.

“It’s more than scripture – it’s history, culture, how we were raised,” says the Rev. Tim McDonald, founder of the African American Ministers Leadership Council.

Some black church leaders are still fighting hard just to persuade straight black couples to marry. Accepting same-sex marriage when so many black households lack a husband and wife makes McDonald uneasy.

“I am not comfortable performing a wedding ceremony of the same sex,” says McDonald, an Obama supporter. “That’s just where I am.”

Some black pastors, however, embrace a literal approach to the Bible not just to exclude gays but to get rid of competition, says Edward Blum, a San Diego State University historian.

Some black pastors cite New Testament passages such as Paul’s demand that women keep silent in churches to argue against black women in the pulpit.

That argument is harder to make when black women’s energy and donations form the backbone of the black church, Blum says, but some still get away with it.

“The biblical literalist reading has kept male leadership in power in a church that is hugely female,” Blum says. “It keeps power in men’s hands.”

The one book that mattered

Black churches also embrace a literal reading of the scripture because of its unique history, says Blum, author of “W.E.B. DuBois, American Prophet.”

During slavery and segregation, many blacks saw the Bible as the one document they could trust. The Constitution, the Declaration of Independence, state and local laws – all found some way to ignore their humanity, Blum says.

The Bible, though, was one book that told them that they weren’t slaves or three-fifths of a person, Blum says.

It said they were children of God.

“Throughout the 18th and 19th century, what document could they trust?” Blum says. “When the Bible says it’s so, it’s something that black people believed they could trust.”

Their enemies, though, used that same veneration of the Bible against them. Slaveholders had a simple but powerful argument when critics challenged them: Trust the Bible.

They cited scriptures such as Ephesians 6:5. (“Slaves, be obedient to those who are your earthly masters, with fear and trembling. ...”) And they said Jesus preached against many sins, but never against slavery.

Since the Bible is infallible, and scripture sanctions slavery, it must be part of God’s order, slaveholders concluded.

“Slavery is everywhere in the Bible,” Blum says. “When Americans who were in favor of slavery defended it with the Bible, they had a treasure trove of clear biblical passages that accepted enslavement.”

Blum says abolitionists found it difficult to mount an effective counterargument. They couldn’t just say trust the Bible. They preached another approach to scriptures.

They said you couldn’t enslave people based on the Golden Rule: Do unto others as you would have them do to you. (Obama cited the Golden Rule and his Christian faith in supporting same-sex marriage).

“The abolitionist turned to the ethics and spirit of the Bible,” Blum says. “They were theological modernists before modernism.”

And what are black clergy and churchgoers today when they cite the Bible to oppose same-sex marriage?

Robinson, the North Carolina pastor, says they’re not homophobes.

“It says in the Bible that homosexuals will not inherit the Kingdom of God,” he says. “How do you explain that one away? A lot of honest Christians are not trying to hate homosexuals. They’re saying that if I take the Bible seriously, I’m not sure I can say it’s right.”

Robinson says that some opposition to homosexuality is actually based in compassion:

“If I’m concerned about your soul, I have to tell you the truth in love.”

Cone, who teaches at Union Theological Seminary in New York City, says black churchgoers opposed to same-sex marriage are instead mimicking their ancestors’ oppressors.

“I tell some people, ‘These people were against you.’ They would have lynched you. How are you going to now join them and help them lynch somebody else?’”