The largely symbolic move, made at the group’s 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 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 rights 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 64-member board, said, “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. Julian Bond, a civil rights activist and former chairman of the N.A.A.C.P., said that Mr. Obama’s recent support for same-sex marriage was “a tipping point” for many board members. He said the vote debunked the myth that the black community is uncomfortable with same-sex marriage. “This proves that conventional wisdom is not true,” Mr. Bond said. The practical implications of 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 marriages and civil unions for gay people. The strongest opposition to same-sex marriage 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. has been grappling with the issue for several years. Among religious figures on the board, the issue was especially fraught with meaning. 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 versus a theological understanding of marriage.” The group’s endorsement could potentially bolster support for Mr. 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 same-sex 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.