A revised version of this article can be found here.

The board of the N.A.A.C.P. voted to endorse same-sex marriage on Saturday, putting the weight of the country’s most prominent civil rights group behind a cause that has long divided some quarters of the black community.

The largely symbolic move, made at the group’s quarterly board meeting in Miami, puts the N.A.A.C.P. in line with President Obama, who endorsed gay marriage a little over a week ago. Given the timing, it is likely to be viewed as both a statement of principle as well as support for the president’s position in the middle of a closely contested presidential campaign.

All but two of the organization’s 64 board members, who include many religious leaders, backed a resolution supporting same-sex marriage, according to people told of the decision.

Borrowing a term used by gay right’s advocates, the resolution stated: “We support marriage equality consistent with equal protection under the law provided under the Fourteenth Amendment of the United States Constitution.”

In a statement, Roslyn M. Brock, chairwoman of the board, said that “we have and will oppose efforts to codify discrimination into law.”

A spokesman for the group declined to discuss a breakdown of how the board members voted.

The practical implications of the the N.A.A.C.P.’s decision are unclear. Several of its leaders have already expressed support for same-sex marriage, and local branches have repeatedly opposed measures

to ban such unions, most recently in North Carolina, where voters just passed a referendum against weddings and civil unions for gay people.

The strongest opposition to gay weddings within the black community has come from church leaders, whose opinions may not be swayed by the N.A.A.C.P. In its resolution, the board appeared to be sensitive to those objections, reaffirming its support for religious freedom.

The N.A.A.C.P. board has been grappling with the issue for several years. Among religious figures on the board, the issue was especially fraught.

Maxim Thorne, a former high-ranking official with the organization, said that “for certain people, it was a very long evolution and a very long process of reconciling their faith with this, and coming to a very civil rights understanding of marriage equality verses a theological understanding of marriage.”

The group’s endorsement could potentially bolster support for President Obama with a key constituency: black Democratic voters who remain skeptical of same-sex marriage.

Black and white Americans are divided on same-sex marriage in similar numbers, according to the results of four aggregated polls conducted by The New York Times and CBS News over the past year.

Yet there is greater opposition among black Democrats than white Democrats. Sixty-one percent of white Democrats supported legalizing marriage for gay couples, compared with 36 percent of black Democrats, while 35 percent of black Democrats opposed any legal recognition, compared with 18 percent of white Democrats.