By some standards, the gathering of about 15 mourners scattered in the pews of the chapel inside a Harlem funeral home might seem a sparse turnout.

But those who were at the Owens Funeral Home knew that even holding this funeral — for a longtime homeless panhandler on the Upper West Side of Manhattan named Eric Glenn Smith — seemed like a small miracle.

Mr. Smith lived on the street for more than 25 years, sleeping in subway stations and on church steps. Those around him were largely unable to help him in life, so when he died, they gained a measure of solace by providing him some dignity in death. They raised money for a proper burial, so he would not wind up in New York City’s potter’s field.

At an elegant service on Tuesday, Mr. Smith lay in a gray coffin bedecked with flowers. A gleaming hearse waited outside to convey him to his final resting place in a New Jersey cemetery, where a headstone would mark his passing.