TOA BAJA, P.R. — The little cluster of friends and neighbors had gathered in front of a concrete home in a flooded-out seaside neighborhood at sunset. They were relieved to be alive after Hurricane Maria, proud of the way they had helped each other, and anxious about whether the relative peace in battered Puerto Rico would hold.

Wilmer Rivera Negron, 34, showed the generator that he was sharing with an older couple, 75 feet away. The couple’s daughter, Luz Collazo Pagan, 55, pointed to a huge pile of felled branches the neighbors had cut with machetes and moved off the street.

Ms. Collazo, a lawyer, also showed the binders full of documents she was referring to as she tried to help her friends without firearms figure out how to buy them legally.

“Basically, we’re drinking wine and talking about how we can best arm ourselves and protect our families,” said Jose Camacho Santiago, 36, a paramedic.

Even before Hurricane Maria, Puerto Ricans had been confronting a kind of disaster narrative as its government, some $74 billion in debt, declared a form of bankruptcy in May.

But the response to the storm has reminded them of the strength of their culture, and its grace notes of solidarity, neighborliness and pride. The stories of residents cleaning up their streets, and sharing electricity, medicine and food, are legion. While there has been some looting, particularly after the storm, officials insist that burglary statistics have not increased.

“I am very proud of the citizens of this island,” said Hector Pesquera, Puerto Rico’s secretary of public safety. “There’s always that minor segment of society that has that criminal inclination, hurricane or no hurricane, that’s always there. During a time of crisis, like happened in 9/11 in New York and other places, we’re all coming together, and that’s something.”

At the same time, many here are wondering just how much stress the island can take, given the social problems it was saddled with before the storm, including a 45 percent poverty rate, 10 percent unemployment and the second worst murder rate in the nation in 2016, behind Washington, D.C.

Diana Lopez Sotomayor, a professor of archaeology and anthropology at the University of Puerto Rico’s Rio Piedras Campus, is among those who fear that the social fabric may begin to fray if residents are forced to deal with months without reliable employment, food and energy.

“There is a new feeling in Puerto Rico, a new ‘nosotros’,” she said, referring to a new sense of we. “More people in the street are saying, ‘Buenos Dias, Como estas?’ You’re in a queue for hours, and of course you become friends. In the same lines are rich and poor. It’s breaking the barriers of class.”

However, she added, “When people are starving they will get violent. If things don’t get better the new ‘nosotros’ is going to break down.”

Statistics released by the Puerto Rico Police Department this week showed that 18 homicides occurred in Puerto Rico the first 10 days after the storm, which hit Sept. 20, the same number in the period a year ago.

There have been rumors of looting, sometimes supported by fact. Mr. Pesquera said that about eight people were arrested in the first days after the hurricane for violating curfew in ways that were obviously intended for criminal activity.