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 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.”