Supreme Court justices tend to say they are not influenced by public opinion. But they do sometimes take account of state-by-state trends, and the latest developments will not escape their notice as they take up two cases related to same-sex marriage.
Support for same-sex marriage among the public has been growing, but the country remains divided. In a Pew poll conducted in October, 49 percent of respondents said they favored allowing gays and lesbians to marry legally and 40 percent were opposed. Four years earlier, in August 2008, the numbers were just about reversed: 39 percent in favor and 52 percent opposed.
A strong majority of younger Americans now support same-sex marriage. In a Gallup Poll conducted last month, 73 percent of people between 18 and 29 years old said they favored it, while only 39 percent of people older than 65 did.
Respondents appear increasingly inclined to say they are personally opposed to same-sex marriage, rather than say it should be illegal.
The New York Times and CBS News have asked a three-part question over the years that has seen an increase in support for gay marriage. In November 2004, 21 percent of respondents said gay couples should be allowed to legally marry, while 32 percent favored civil unions and 44 percent said there should be no legal recognition of gay couples' relationships. In May, 38 percent supported legal marriage, only 24 percent still favored civil unions and 33 percent still said there should be no legal recognition of same-sex couples.
Among conservative Republicans, an overwhelming majority opposes same-sex marriage. By contrast, a wide majority of liberal Democrats favor allowing gays and lesbians to marry legally. Views of independents, and moderates in both parties, are more mixed.
While about half of the country supports the legalization of same-sex marriage, supporters are not evenly distributed. Based on Pew data, a majority favor same-sex marriage in New England, in the mid-Atlantic states and along the Pacific Coast. In the Midwest and the south Atlantic states, opinion is closely divided, but in the central South, a majority opposes same-sex marriage.
About two in three people who attend religious services on a weekly basis oppose same-sex marriage, according to Gallup. About two in three people who attend religious services less than monthly favor it.
Regardless, there has been an increase in support for same-sex marriage across almost all groups. According to Pew polls, the percentage that currently favors allowing gays and lesbians to marry legally is far higher now than it was a decade ago in every region, for instance.
Until recently, blacks have been less supportive of same-sex marriage than whites. According to Pew polls conducted in 2011, 49 percent of whites favored same-sex marriage along with 36 percent of blacks. But in their latest poll, there was not much difference in the views of blacks and whites.
In an Edison Research exit poll, 51 percent of black voters supported recognizing same-sex marriage in their states and 41 percent were opposed. Among whites, 47 percent were in favor and 49 percent were opposed.
Some analysts believe that Mr. Obama's public shift played a particular role in influencing African-Americans.
The exit poll also found that 59 percent of Hispanic voters supported same-sex marriage in their states with 32 percent against it.
This is consistent with the Pew 2012 Survey of Latinos in which 52 percent were in favor of allowing gays and lesbians to marry legally and 34 percent were opposed. In earlier surveys taken in 2006 and 2009, opposition to same-sex marriage exceeded support by wide margins among Hispanics.
Adam Liptak contributed reporting from Washington.
This article originally appeared in The New York Times.