The Supreme Court's ruling last month legalizing same-sex marriage nationwide has left Americans sharply divided, according to an Associated Press-GfK poll that suggests support for gay unions may be down slightly from earlier this year.

The poll also found a near-even split over whether local officials with religious objections should be required to issue marriage licenses to same-sex couples, with 47 percent saying that should be the case and 49 percent say they should be exempt.

Overall, if there's a conflict, a majority of those questioned think religious liberties should win out over gay rights, according to the poll. While 39 percent said it's more important for the government to protect gay rights, 56 percent said protection of religious liberties should take precedence.

The poll was conducted July 9 to July 13, less than three weeks after the Supreme Court ruled states cannot ban same-sex marriage.

According to the poll, 42 percent support same-sex marriage and 40 percent oppose it. The percentage saying they favor legal same-sex marriage in their state was down slightly from the 48 percent who said so in an April poll. In January, 44 percent were in favor.

Asked specifically about the Supreme Court ruling, 39 percent said they approve and 41 percent said they disapprove.

"What the Supreme Court did is jeopardize our religious freedoms," said Michael Boehm, 61, an industrial controls engineer from the Detroit area who describes himself as a conservative-leaning independent.

"You're going to see a conflict between civil law and people who want to live their lives according to their faiths," Boehm said.

Boehm was among 59 percent of the poll respondents who said wedding-related businesses with religious objections should be allowed to refuse service to gay and lesbian couples. That compares with 52 percent in April.

Also, 46 percent said businesses more generally should be allowed to refuse service to same-sex couples, while 51 percent said that should not be allowed.

Claudette Girouard, 69, a retiree from Chesterfield Township, Michigan, said she is a moderate independent voter who has gradually become supportive of letting same-sex couples marry.

Girouard said local officials should be required to perform same-sex marriages, but does not think that wedding-related businesses should be forced to serve same-sex couples.

"If the official doesn't like what he's being asked to do, then quit," she said. "But businesses are kind of independent, so if they have a strong belief against it, there are enough other businesses out there for someone to use."

The poll found pronounced differences in viewpoints depending on political affiliation.

For example, 65 percent of Democrats, but only 22 percent of Republicans favored allowing same-sex couples to legally marry in their state. And 72 percent of Republicans but just 31 percent of Democrats said local officials with religious objections should be exempt from issuing marriage licenses.

By a 64-32 margin, most Democrats said it's more important to protect gay rights than religious liberties when the two are in conflict. Republicans said the opposite, by 82-17.

Clarence Wells, 60, a conservative from Rockwood, Tennessee, said he strongly disapproved of the Supreme Court's ruling. He anticipates friction as gay couples try to exercise their newfound rights and people with religious objections to same-sex marriage balk at accepting them.

"I don't believe it's going to go over smoothly," said Wells. "I think a lot of them will be shunned in church. ... I think there will businesses that are going to close, because some people are stubborn enough to not want to deal with it."

Andrew Chan, 41, a moderate independent from Seattle, said he has tried to remain neutral on same-sex marriage.

"For me, it's always been about tolerating," said Chan, who works for a nonprofit organization. "I've got friends on both sides."

Chan said he was happy for gays and lesbians who have found someone they want to marry, and he expressed some wariness toward politicians who might try to roll back the Supreme Court ruling.

"That just creates more division," he said. "Are we looking to move the country forward or move it backward?"

___

The AP-GfK Poll of 1,004 adults was conducted online July 9 to July 13, using a sample drawn from GfK's probability-based KnowledgePanel, which is designed to be representative of the U.S. population. The margin of sampling error for all respondents is plus or minus 3.4 percentage points. Some questions were ask of half samples of respondents and have smaller margins of error. Respondents were first selected randomly using phone or mail survey methods, and later interviewed online. People selected for KnowledgePanel who didn't otherwise have access to the Internet were provided access at no cost to them.

Poll respondents were divided over allowing same-sex marriage in their own state, with 42 percent in favor and 40 percent opposed.

The poll found no surge in support for same-sex marriage since the court's ruling June 26. If anything, support was down slightly since April, when 48 percent said they were in favor in another AP-GfK survey. An earlier poll, conducted in January and February, found 44 percent in support of same-sex marriage.

___

A NEW BATTLEGROUND

As marriage rights for gay couples become settled law, divisions exist over how the law should handle those who have religious objections to same-sex marriage.

When the two are in conflict, 56 percent of those questioned said it's more important for the government to protect religious liberties, while 39 percent said it's more important to protect the rights of gays and lesbians.

People were split over whether officials who issue marriage licenses should be allowed to say no to gay and lesbian couples because of religious objections. Just under half said those officials should not have to issue the licenses, about the same proportion saying they should.

Also, 59 percent think wedding-related businesses should be allowed to refuse service to same-sex couples, compared with 52 percent in the earlier poll. By comparison, 46 percent said businesses in general should be allowed to refuse service because of their religious principles, while 51 percent said that should not be allowed.

___

RELIGIOUS DIVIDES

Self-described members of Protestant denominations were more likely to oppose than favor same-sex marriage, 52 percent to 32 percent.

Catholics were more likely to be in favor than opposed, 48-32. Seven in 10 evangelical Christians opposed allowing same-sex couples to marry legally. On the other hand, 56 percent of those who do not belong to any religious denomination said they were in favor.

Also, 60 percent of Protestants, 48 percent of Catholics and 76 percent of evangelicals said local officials should not have to issue marriage licenses to same-sex couples. Just 37 percent of those with no religious affiliation agreed.

___

SHARP PARTISAN DIVISIONS

The survey found a vast gulf between Democrats and Republicans.

For example, 65 percent of Democrats but only 22 percent Republicans favored allowing same-sex couples to legally marry in their state.

Most Democrats said it was more important for the government to protect gay rights, 64 percent to 32 percent. Most Republicans said it was more important to protect religious liberties than gay rights, 82-17.

And 7 in 10 Republicans, but just 3 in 10 Democrats, said local officials with religious objections should be exempt from issuing marriage licenses.