WASHINGTON (AP) — In the late 1980s, support for gay marriage was essentially unheard of in America. Just a quarter century later, it's now favored by clear majority of Americans.

That dramatic shift in opinion is among the fastest changes ever measured by the General Social Survey, a comprehensive and widely respected survey that has measured trends on a huge array of American attitudes for more than four decades.

Support for a right of same-sex couples to marry has risen 8 percentage points in the past two years and jumped 45 points since the question was first asked in 1988, when only 11 percent of Americans said they agreed with the idea. The survey now finds that only a third of Americans are opposed to gay marriage.

The largest shift in support since 2012 has come among Republicans, just under half of whom — 45 percent — now support marriage rights for same-sex couples. That's a jump of 14 percentage points since 2012.

"Many things don't change a lot. Most things change very slowly," said Tom W. Smith, director of the General Social Survey. "This is one of the most impressive changes we've measured."

The General Social Survey is conducted by NORC, an independent research organization based at the University of Chicago, with funding from the National Science Foundation. It is a highly regarded source of data about social trends because of its long-running and comprehensive set of questions about the demographics and attitudes of the American public.

Data from the 2014 survey was released this week, and an analysis of its findings on gay marriage was conducted by The Associated Press-NORC Center for Public Affairs Research and the General Social Survey.

As support for same-sex marriage has risen, the survey found, so has acceptance for gays and lesbians and for their relationships. Although 4 in 10 Americans still say sexual relationships between members of the same sex are always wrong, that's half as many as said so in 1987. And while in 1976 only about half of Americans — 53 percent — said a gay person should be allowed to teach at a college or university, 88 percent now say that is all right.

The release of the 2014 survey comes as federal courts have rapidly increased the number of states where same-sex couples can legally marry, and as marriages licenses are now being issued in at least 36 states. The U.S. Supreme Court is expected before July to rule on whether states can legally exclude gay and lesbian couples from marrying, or if those bans violate the U.S. Constitution.

The survey found that 56 percent of Americans overall now agree that gay and lesbian couples should have the right to get married, up from 48 percent who said so in 2012.

Although the largest growth in support came among Republicans, Democrats and independents are still more likely than Republicans to support marriage rights for gay and lesbian couples. And Democrats, too, are more likely to support marriage rights now — 65 percent— than they were two years ago, when this held favor with 59 percent of Democrats. Support held steady among independents, 54 percent of whom support marriage rights for gay couples.

When the GSS first asked Americans the question in 1988, support for gay marriage hovered in the range of 1 to 10 percent in all three groups.

The survey also found a double-digit increase in support over the past two years among 50 to 64 year olds, half of whom now favor marriage rights for gay couples, and among 18 to 34 year olds, more than 7 in 10 of whom support it.

At least half of Americans in all age groups, except those aged 65 and over, now favor legal same sex marriage, the survey found.

The General Social Survey is administered by NORC at the University of Chicago, primarily using in-person interviewing. The GSS started in 1972 and completed its 30th round in 2014.

The typical sample size was 1,500 prior to 1994, but increased to 2,700-3,000 until 2008, and decreased to 2,000 for the most recent surveys. Resulting margins of error are between plus or minus 3.1 percentage points for the smaller sample sizes and plus or minus 2.2 percentage points for the larger sample sizes at the 95 percent confidence level. The 2014 survey was conducted March 31-Oct. 11, 2014 among 2,538 American adults. The GSS 1972-2014 Cumulative File was utilized to produce the statistics presented.

___

Online: http://www.apnorc.org

___

AP writer Mark Sherman contributed to this report from Washington.

___

Follow Emily Swanson on Twitter at: http://twitter.com/EL_Swan