In June hundreds of families fled their Christian community to a neighboring Muslim community when they came under attack by about 300 armed men who began shooting sporadically and burning down homes, according to BBC.

An imam in the community rushed to aid the families, hiding more than 250 men, women, and children in his mosque and home.

Violence is not new to the central region of Nigeria where the attacks occurred. Farming communities and cattle herders often clash over land access and grazing rights. And the disputes are usually intensified over racial tension — the herders are mainly Muslim, while the farmers are mainly Christian.

A 2016 report from SBM Intel suggests Nigeria’s pastoral conflict was the cause of more deaths than Boko Haram.

If the imam had not intervened to help the fleeing families, the death toll could have been much higher. The villagers stayed with the imam for five days before moving to a camp for displaced people, where more than 2,000 people now live.