In the hours after an imam and his assistant were shot dead on a Queens street on Saturday, several elected officials rushed to the scene.

They sought to reassure the community, amid fears that the two men were killed because of their religion, in a climate when anti-Muslim sentiment has been percolating across the nation. Among the officials were the the local councilman, Eric Ulrich, a Republican; and the only Muslim member of the Council, I. Daneek Miller, a Democrat.

Mayor Bill de Blasio was not among them.

It took the mayor more than 24 hours to issue a written statement on the killings, and a full two days before he addressed the community, during funeral prayers for the two men on Monday.

The mayor, a Democrat, received applause during his short speech, not far from the imam’s Ozone Park mosque, which seemed to soothe some of the unease over the pace of his response.