The gunman approached the men from behind and shot both in the head at close range at about 1:50 p.m. EDT (1750 GMT) on ablistering hot afternoon in the Ozone Park neighborhood, police said in a statement, adding that no arrests had been made.
The motive for the shooting was not immediately known and no evidence has been uncovered that the two men were targeted because of their faith, said Tiffany Phillips, a spokeswoman for the New York City Police Department.
Even so, police were not ruling out any possibility, she added. The victims, identified as Imam Maulama Akonjee, 55, and Thara Uddin, 64, were both wearing religious garb at the time of shooting, police said.
Police had initially identified Uddin as Tharam. The men were transported to Jamaica Hospital Medical Center where they died, hospital spokesman Andrew Rubin said.
The Council on American-Islamic Relations, a Muslim civil rights and advocacy group known by the acronym CAIR, said Uddin was an associate of the imam.
"These were two very beloved people," Afaf Nasher, executive director of the New York chapter of CAIR, told Reuters. "These were community leaders.
"There is a deep sense of mourning and an overwhelming cry for justice to be served," Nasher said. "There is a very loud cry, too, for the NYPD to investigate fully, with the total amount of their resources, the incident that happened today."
The organization held a news conference on Saturday evening in front of the mosque, the Al-Furqan Jame Masjid, where the two men had prayed.
"We are calling for all people, of all faiths, to rally with compassion and with a sense of vigilance so that justice can be served," Nasher said. ""You can't go up to a person and shoot them in the head and not be motivated by hatred."
The suspect was seen by witnesses fleeing the scene with agun in his hand, police said.
"We are currently conducting an extensive canvass of the area for video and additional witnesses," Deputy Inspector Henry Sautner said in a statement.
Eric Phillips, a press secretary for New York City MayorBill de Blasio, said the mayor was closely monitoring the policeinvestigation into the shootings.
"While it is too early to tell what led to these murders, itis certain that the NYPD will stop at nothing to ensure justice is served," Phillips said in a statement.
Akonjee was described as a peaceful man who was belovedwithin Ozone Park's large Muslim community.
"He would not hurt a fly," his nephew Rahi Majid, 26, toldthe New York Daily News. "You would watch him come down the street and watch the peace he brings."
Video footage posted on YouTube showed dozens of men gathered near the site of the shooting, with one of them tellingthe crowd that it appeared to be a hate crime, even as policesaid the motive was still unknown.
"We feel really insecure and unsafe in a moment like this,"Millat Uddin, an Ozone Park resident told CBS television in NewYork. "It's really threatening to us, threatening to our future,threatening to our mobility in our neighborhood, and we're looking for the justice."