James Wells, a member of a South Carolina civil rights group known as the Friendship Nine, died July 8 at his home in Rock Hill, S.C. He was 77.

A representative with the Robinson Funeral Home in Rock Hill confirmed the death but did not give a cause.

Mr. Wells spent a month in jail in 1961 after he and eight other black men were charged with trespassing at a whites-only lunch counter in Rock Hill.

The men, who were attending nearby Friendship Junior College, chose to spend time in jail rather than pay a fine in what was called the “jail, no bail” movement. Their time on a chain gang in York County encouraged protesters to stay in jail to fight segregation, Jim Crow laws and other forms of racism.

The convictions of Mr. Wells and the other members of the Friendship Nine were overturned in 2015. York County prosecutors apologized to the group for their arrests and time in jail.

“Jim Wells was one of our quiet leaders, an inspiration to all of us,” said David Williamson, a member of the group. “He was so smart and gentle. A great, great man.”

Mr. Wells signs a book about the Friendship Nine. (Jason Miczek/Reuters)

Mr. Wells was born on June 25, 1941. He served in the Air Force and graduated from Johnson C. Smith University in Charlotte and the University of Illinois College of Law.

He was preceded in death by two other members of the Friendship Nine: Robert McCullough in 2006 and Clarence Graham in 2016.

“Jim Wells was a friend of mine my whole life,” said Willie McCleod, a Friendship Nine member. “He believed in what we were doing back then, and was willing, like all of us, to go to jail for what was right.”

The Friendship Nine are honored with stools at the former lunch counter where the protests took place. There also are signs and markers about the group around the city.