According to a recent AP-GfK poll, a majority of Americans say religious liberties should take precedence over gay rights.

The online poll of 1,004 adults was conducted July 9-13, less than 3 weeks after the Supreme Court struck down gay marriage bans in all 50 states.

The poll found that 49 percent of respondents believe that local officials who oppose marriage equality based on their religious beliefs should not be forced to issue marriage licenses to gay couples. Forty-seven percent disagree, the AP reported.

A majority (56%) also said that protecting religious liberty should trump gay rights.

Pollsters also found 42 percent support for marriage equality and 40 percent opposition. Moreover, 41 percent said that they disapprove of the Supreme Court's ruling, with 30 percent in favor.

A majority (82%) of Republicans said that religious liberties should win out over gay rights when there's a conflict, while a majority (64%) of Democrats said the opposite.