Outraged members of the Islamic community in Queens gathered, seeking answers as authorities continued their investigation into the fatal shooting Saturday afternoon of an Ozone Park imam and another man in religious garb as they walked two blocks from their mosque.

NYPD officials said they had not determined a motive in the afternoon shooting deaths of Maulana Akonjee, 55, an imam at the al-Furqan Jame Masjid, and Thara Uddin, 64, of Queens, who relatives said was Akonjee’s longtime friend but who some Muslim groups identified as his assistant.

The two men were shot in the head shortly before 2 p.m. as they walked on 79th Street, police said. They were taken to Jamaica Hospital Medical Center in critical condition, where first Akonjee, then Uddin were pronounced dead Saturday.

The gunman, who wore a dark polo shirt and shorts, was seen on video surveillance and by witnesses running from the scene with a gun, police said.

At a news conference hours after the shooting, Deputy Insp. Hank Sautner of the NYPD Queens South Detective Bureau said police were continuing to investigate whether a hate crime was a possibility, but so far “there is nothing in the preliminary investigation that would indicate they were targeted because of their faith.”

A high-ranked law enforcement official said a surveillance video showed both victims walking into and out of the frame, and then the shooter coming up behind them before exiting the frame.

advertisement | advertise on newsday

The official said Akonjee had been carrying $1,000 in cash, which was not taken.

Many in the community said they believed the men were targeted for their religion.

Hundreds of residents stood on Liberty Avenue under the train tracks Saturday evening — many wearing traditional religious attire — shouting: “We want justice!” and “We say hate crime!”

Mohammed Mannan, 65, said he attended the mosque yesterday morning with the imam and said he believes Akonjee was targeted, because the imam’s beard, cap and tunic made it clear he was Muslim.

“Who killed him? We want justice,” Mannan said. “He’s an innocent man.”

Meanwhile, grieving relatives and friends gathered Saturday at the homes of the victims, who lived on the same block just a few houses apart.

Akonjee’s daughter Naima Akonjee, 28, of Queens, said relatives were delaying telling her mother that her husband was dead.

“I want to tell her but I cannot,” Naima Akonjee said. “She’s feeling sick. I don’t know what to do. I don’t want to put her through that. I’m scared to tell her.” Maulana Akonjee had seven children, while Uddin had three children, according to their relatives.

Uddin’s nephew Shezwan Uddin, 22, of Ozone Park, said Uddin’s son called him crying to tell him of the news. “He said, ‘Somebody’s shot my father! Somebody shot my father!’ ” Shezwan Uddin said.

A spokesman for Mayor Bill de Blasio said the mayor was “closely monitoring” the investigation.

advertisement | advertise on newsday

“We have a senior liaison with the Muslim community on-site to ensure mosque congregants and the neighborhood receive all the support and information they need during this difficult time,” de Blasio spokesman Eric Phillips said in a statement. “While it is too early to tell what led to these murders, it is certain that the NYPD will stop at nothing to ensure justice is served.”

New York City Councilman Eric Ulrich (R-Ozone Park) spoke into a megaphone during the rally and told the crowd, “Justice will be served in Ozone Park.”

“There’s no evidence to suggest this was a hate crime as of right now,” Ulrich said later in an interview. “This was a heinous act that happened in broad daylight.”

Abdul Azeem Khan, an imam from Jamaica, came to the scene of the shooting to offer moral support.

He said the community doesn’t know what led to the killings, but that the current climate toward Muslims and the proposed immigration ban by Donald Trump hurts them.

advertisement | advertise on newsday

“Tension is growing,” Khan said. “People think Muslims are bad people. Donald Trump is sending the wrong message.”

Habeeb Ahmed, a leader with the Islamic Center of Long Island in Westbury, said he considered the shootings a “hate crime in broad daylight.”

“Islamophobia is so rampant and some presidential candidates are fanning these flames,” Ahmed said.

Trump’s campaign issued a statement Saturday after the shootings.

“To blame any political candidate for these murders is a highly irresponsible and obviously politically motivated attempt to push an agenda,” the statement read.

With Anthony M. DeStefano

CORRECTION: An earlier version of this story misspelled the name of Imam Maulana Akonjee.