An expansive constitutional amendment that could bar not only gay marriage but any kind of domestic partnership or civil union in North Carolina passed overwhelmingly on Tuesday, despite opposition from President Obama and many key black and white leaders, both in the state and nationally.

The result was not a surprise, but constituted a major setback for the gay rights movement, which has seen a number of states legalize gay unions in the last several years. The provision, called “Amendment One,” passed even as Obama’s campaign in North Carolina emphasized his opposition to it and top administration officials this week, including Vice President Biden, said they supported gay unions.

Every other state in the South had already passed an anti-gay marriage amendment. But gay rights advocates thought they had a chance in North Carolina, a state with large pockets of liberal voters that Obama won in 2008. In addition to Obama, the Rev. Al Sharpton, former President Clinton and other Democratic leaders have spoken out against the amendment.

“He believes the North Carolina measure singles out and discriminates against committed gay and lesbian couples, which is why he did not support it. President Obama has long believed that gay and lesbian couples deserve the same rights and legal protections as straight couples and is disappointed in the passage of this amendment,” an Obama spokesman said after the vote.

The vote also illustrates the reluctance of some Democrats, including African-Americans, to embrace gay marriage, which is also opposed by a majority of Republicans, according to polls. Black leaders, such as former Charlotte mayor Harvey Gantt, had pushed African-American voters to oppose the amendment, arguing it was an attempt by conservatives to divide two largely-Democratic voting blocs, blacks and gays.

But polls before the vote suggested a majority of blacks would support the gay marriage ban, with many citing their Christian faith to support the view that marriage can only take place between a man and a woman.

There were no exit polls from last night’s election, but in several of the majority-black counties that Obama carried in 2008, the amendment received more than 60 percent support. Several majority-black precincts in the Charlotte area also showed strong support for the amendment, according to the Charlotte Observer.