In many ways, the questions in Al Qaa echo those that followed attacks in Orlando, Fla.; Paris; and Istanbul: How can a community protect itself from a lone assailant or a small team of attackers with guns or bombs? And local leaders are struggling with the same issue facing Europe as it deals with its own influx of migrants: How to balance the desire to help with fears that the newcomers could harbor a threat?

“It is not easy for people, when their sons have died or are in critical condition, to differentiate between terrorists and refugees,” the Rev. Elian Nasrallah, the Roman Catholic priest who oversees Al Qaa’s churches, said during an interview in his home. He had coordinated aid for refugees and would help lead the funeral for the town’s dead.

The scale of the refugee crisis in Lebanon would make Western leaders cringe. The country has added 1.5 million Syrians to a population of only 4.5 million, giving Lebanon the world’s highest refugee count per capita.

Much of that burden has fallen on towns like Al Qaa in the Bekaa Valley, where low rents, proximity to Syria and an abundance of agricultural jobs have encouraged so many Syrians to settle that they now outnumber locals in many towns, straining municipal services.