They were fleeing from a neighbouring village - a mainly Christian community.
They say they came under attack from about 300 well-armed men who started shooting sporadically and burning down their homes.
Some of those who managed to escape ran towards the mainly Muslim neighbourhood nearby where the imam lived, arriving over the next hour.
The cleric immediately came to their aid, hiding in total 262 men, women and children in his home and mosque.
"I first took the women to my personal house to hide them. Then I took the men to the mosque," the imam said.
We have blurred the faces of the imam and the villages, for their own safety.
This was the latest wave of violence to hit Nigeria's central region where farming communities and nomadic cattle herders often clash - usually over access to land and grazing rights.
The region is prone to religious tension - herders are ethnic Fulani and mostly Muslim, while the farmers are mostly Christian from the Berom ethnic group. Hundred of people have been killed in 2018, and the tit-for-tat violence has been ongoing for several years.
BBCGüncelleme Tarihi: 02 Temmuz 2018, 09:48