A New York City man was convicted Friday of first-degree murder for the broad daylight killings of a Muslim cleric and his assistant.

A state supreme court jury convicted Oscar Morel, 37, in the fatal shootings of Imam Maulana Akonjee and Thara Uddin, his friend and assistant. The men were shot as they walked home following prayers on 13 August 2016.

Richard Brown, district attorney of the borough of Queens, described the killings as “a senseless act of gun violence in the middle of the afternoon, carried out in a close-knit neighborhood filled with families and children.”

Morel, of Brooklyn, was convicted following a nearly three-week-long trial. Jurors deliberated for about a day and found him guilty of one count of first-degree murder, two counts of second-degree murder and one count of second-degree criminal possession of a weapon. He had denied the charges.

He faces life in prison without parole when he is sentenced on 18 April.

Some in New York City’s Muslim community called the attack on the two Bangladeshi immigrants a hate crime, but prosecutors said the killer’s motive remained unclear.

Afaf Nasher, the executive director of the New York chapter of the Council on American-Islamic Relations, released a statement on behalf of the victims’ families expressing gratitude for the conviction.

“Maulana and Thara came to this country in search of a better life, instead they found Mr Morel’s hatred,” the statement said. “Nothing can ever replace what Mr Morel took from us, but this verdict helps show that this city will never accept this sort of heartbreaking violence.”

Prosecutors said Morel approached 55-year-old Akonjee and 64-year-old Uddin from behind as they left the Al-Furqan Jame Masjid mosque and shot them both in the head. The victims were rushed to a hospital, where they died.

Morel was arrested the following day after police connected him to a hit-and-run crash near the shooting scene.

Prosecutors said the police ballistics lab linked a .38-caliber revolver recovered from Morel’s basement to the shootings.

