Shortly before noon on Sunday, most of the swaying and singing had subsided at the Upper Room Church of God in Christ in Raleigh, N.C., and the Rev. Patrick L. Wooden began his sermon.

He talked about how the powerful Amaziah tried to intimidate the humble Amos, who warned of the impending doom of Israel. “The people didn’t like [Amos’s] preaching,” Wooden told the 1,600 congregants in attendance. He saw a parable for modern times.

“We’ve got a sitting president who supports same-sex marriage, who never met an abortion law he didn’t love,” Wooden preached. “Our definition of marriage doesn’t come from the president or the Constitution. We get our definition of marriage from the creator,” he thundered, and a chorus of “amens” and applause pealed through the cavernous church.

Two days before the presidential election, black preachers across Raleigh were urging all souls to go to the polls, in tacit or overt support for President Obama. But in a state that’s too close to call, Wooden, who is black, was telling his African American congregation not to feel forced to choose between religion and politics, or even race; in that choice, he said, believers must stand on the Word.

In 2008, with more than 4.3 million ballots cast, Obama won North Carolina by about 14,000 votes. The state is a tossup this year, although most surveys show a tie or give Mitt Romney a one- or two-percentage-point advantage. In a state where blacks make up 22.4 percent of registered voters, Wooden’s is a message that could make a difference.

Explore the 2012 electoral map and view historical results and demographics

Wooden had been a vocal supporter of Amendment 1, a North Carolina ballot initiative banning same-sex marriage that passed May 8. The Obama campaign said the president was “disappointed” with the amendment and, on May 9, Obama officially endorsed same-sex marriage in an interview with Robin Roberts of ABC News.

In early fall ads on black radio, Wooden, a registered independent, accused the president of turning “his values on the values of our community” and urged listeners to say “no more to President Obama.”

Pastors and leaders from the local NAACP denounced Wooden, saying his focus on a single issue missed the bigger picture. “It will be Romney, not God, who benefits from your ads,” wrote Curtis Gatewood, a minister, child and anti-violence activist, and former president of the Durham NAACP. “My issue is that he’s the president of all people — straight, gay, African American. That’s my perspective. The president is not running for pastor in chief, he is running to be the president of all people.”

After the sermon, Wooden said he wished the president hadn’t inserted himself into North Carolina politics. With high rates of divorce and single motherhood, the black family is in crisis, he had preached. “And you want to add gay marriage to that mix?”

Blacks are taught to live conservatively — get an education, work twice as hard and don’t expect anyone to give anything — but to vote Democratic. He called his message a plea for more political sophistication but not a vote for Romney. He said that he has been accused of taking money from the Romney campaign, but that it has not contacted him. Wooden said Mormon teachings go against his beliefs.

His congregation is not a monolith, and Wooden predicted that on Tuesday, “some won’t vote for either side and some will vote for Obama.” As for Romney? Wooden estimates that the Republican will receive two or three votes from the congregation of about 3,000. He called it a shame. “I think it’s time we let both parties know we’re dateable.”