PORTSMOUTH — Fourteen slaves who petitioned the New Hampshire Legislature for their freedom during the Revolutionary War were granted posthumous emancipation Friday when the governor signed a largely symbolic bill that supporters hope will encourage future generations to pursue social justice.

A group of 20 slaves who had fought in the war submitted a petition to the New Hampshire General Assembly on Nov. 12, 1779, while the war was still being fought. They argued that the freedom being sought by Colonists should be extended to them as well and maintained that “public tyranny and slavery are alike detestable to minds conscious of the equal dignity of human nature.”

“Their plea fell on deaf ears,” Gov. Maggie Hassan said before signing the bill emancipating the 14 who were never freed. “It is a source of deep shame that our predecessors didn’t honor this request. But today, more than 230 years too late for their petition, we say that freedom truly is an inherent right not to be surrendered.”

The original petition was found in state archives nearly 30 years ago, but supporters pushed lawmakers to pass the bill this year in part to bring attention to an African-American burial ground in downtown Portsmouth, where the city is raising money to build a memorial park to commemorate the site. The remains of six African slaves were discovered at the site several years ago during routine street improvements.

Excerpts from the 1779 petition will be etched in stone and be part of the park.

Together with the park and the nearby Seacoast African American Cultural Center, the bill signed Friday is part of a lengthy journey to ensure that today’s children and future generations understand the region’s history, said Portsmouth Mayor Eric Spear.

“When you think about slavery as ‘down there’ or ‘over there,’ it has a distance that doesn’t make it as real,” he said. “All the future residents are going to know a little bit more about their own history, their own land and how slavery was a part of that.”

Tom Watson, president of the Portsmouth Athenaeum, said the bill signing was important for several reasons, including the simple act of righting a wrong. It also serves as a reminder of contributions that African-Americans have made to the state.

“The public acknowledgment of our mistakes is really the first step in the process of reconciliation that all societies must go through if they’re going to address injustice,” he said.

Valerie Cunningham, who wrote a history of slavery in Portsmouth, noted that the petitioners weren’t asking for money, nor were they just asking for their own freedom; they were asking the state to abolish slavery altogether.

“Let’s celebrate today with the expectation that this symbolic act will remind us to continue working for social justice here in the Granite State,” she said.