The few people in support of the shelter were jeered while the crowd erupted into cheers for opponents, including a woman said that she did not care about homeless people and that she was afraid of them. “I don’t want them in my back yard. They are a ticking bomb,” she said, adding later, “I hope somebody’s going to burn the place down.”

Mr. Santos’s last known address was a shelter in Brooklyn, according to the police, but it appeared he had not been there for months.

He had moved from the Dominican Republic to New York about five years ago to live with his mother and grandfather, leaving two young children behind, said Floralba Santos, 40, his aunt. He had been behaving oddly on the island. “His mother brought him over to start a new life with her,” his aunt said in Spanish.

Soon after his arrival, however, he became depressed and starting using illegal drugs, which made him paranoid and violent, she said. “What really messed up his mind were drugs,” Ms. Santos said. Then, about two years ago, he attacked his grandfather during an argument and “almost killed him.” His mother, Fiordaliza Rodriguez, told him he could no longer stay in the apartment.

“That’s when we kicked him out of our lives,” the aunt said. “We thought we would never forgive him.”

Mr. Santos occasionally stayed in an abandoned building on the same block as his mother’s building. More often, however, neighbors saw Mr. Santos sleeping in the stairwell of his mother’s building. His head would be in a corner and his shoeless feet would hang slightly off the steps. People would have to step over him.

His aunt said that about a month ago, after being released from jail, Mr. Santos had told her, “Aunt, I am losing my mind.”