In a historic moment for the gay-rights movement, President Obama stated his full support Wednesday for the right of same-sex couples to marry.

Mr. Obama had long held that civil unions provided the equal rights that he felt gay and lesbian couples deserved, but over the last year and a half, he described his views as “evolving.”

Now, after comments on Sunday by Vice President Biden voicing support for gay marriage, as well as those of other top political allies, Obama said in an interview with ABC News that he backs full marriage rights for same-sex couples.

The president made the statement a day after voters in North Carolina approved by a wide margin an amendment to their state constitution that bans not only gay marriage but also civil unions and potentially other kinds of domestic partnerships.

"I have to tell you that over the course of several years, as I have talked to friends and family and neighbors, when I think about members of my own staff who are in incredibly committed monogamous relationships, same-sex relationships, who are raising kids together, when I think about those soldiers or airmen or marines or sailors who are out there fighting on my behalf and yet feel constrained, even now that ‘don't ask, don't tell’ is gone, because they are not able to commit themselves in a marriage, at a certain point I’ve just concluded that for me personally it is important for me to go ahead and affirm that I think same-sex couples should be able to get married,” Obama told Robin Roberts of ABC News in an interview that will run on “Good Morning America” Thursday.

Excerpts of the interview will air Wednesday evening on ABC’s “World News with Diane Sawyer,” the network said.

Obama’s statement was widely applauded by gay-rights activists, who had long thought that, in his heart, the president backed gay marriage but was holding off on speaking publicly until after the Nov. 6 election.

“Today, President Obama made history by boldly stating that gay and lesbian Americans should be fully and equally part of the fabric of American society and that our families deserve nothing less than the equal respect and recognition that comes through marriage,” Joe Solmonese, the president of the Human Rights Campaign, the nation’s largest gay advocacy group, said in a statement.

Mr. Solmonese linked Obama’s status as the first black president to the cause of civil rights for gays and lesbians.

“His presidency has shown that our nation can move beyond its shameful history of discrimination and injustice,” he said. “In him, millions of young Americans have seen that their futures will not be limited by what makes them different.”

Obama’s statement has more rhetorical and political significance than any real change that can be effected on the ground. Marriage laws are determined at the state level, and in recent years, the nation has become a patchwork. Six states and the District of Columbia recognize same-sex marriage. This fall, the issue will be on the ballot in as many as four states, including Maryland, whose legislature recently approved gay marriage. Including North Carolina, 30 states have banned gay marriage in their constitutions.

For Obama, the long-awaited statement of support could carry political risks. A majority of African Americans oppose gay marriage, and so he appears to be gambling that he will not jeopardize his support among this crucial segment of his base. Obama currently enjoys more than 90 percent support among black voters.

On the plus side for Obama, he can now stop what many supporters felt was his charade of “evolution.” Some had chided him for promising as a candidate in 2008 that he would always be honest with the voters, while on this issue he seemed to be hedging to a degree that was not credible.

In the ABC interview, Obama said he was influenced not only by gay staff members, and gay military men and women who are now legally allowed to serve openly, but also by conversations with his wife and daughters.

Positive reactions from Democrats flooded in as soon as the news broke.

“The president's unequivocal support today in favor of all committed couples to marry the person they love is a watershed moment in American history that will provide the leadership needed to finally repeal DOMA and win the unfinished fight for equality for all Americans,” Sen. Kirsten Gillibrand (D) of New York said in a statement.

DOMA stands for the Defense of Marriage Act, a federal law passed under the Clinton administration that defines marriage as between a man and a woman. In February 2011, the Obama administration announced it would no longer defend the constitutionality of DOMA in court.

Social conservatives also weighed in quickly over Obama’s statement.

“The charade is finally up,” said religious conservative leader Gary Bauer in a statement. “We’ve always known that Barack Obama supports same-sex marriage. With every action he’s taken, from court appointments to his rhetoric, he’s been preparing the way to undermine traditional marriage. Obama’s finally made that support explicit.”