A New York City man appeared in court on Tuesday and denied charges he shot and killed a Muslim cleric and his assistant on a street in the borough of Queens over the weekend.

Oscar Morel, 35, faces up to life in prison without parole if he is convicted of killing Imam Maulama Akonjee, 55, and Thara Uddin, 64, in a brazen daylight attack on Saturday that horrified the neighbourhood's Bangladeshi community.

Morel, who was shackled at the hands and feet and wore a tan button-down shirt with black pants, was arraigned at Queens Criminal Court on one count of first-degree murder, two counts of second-degree murder and two counts of second-degree criminal possession of a weapon.

"It's the most horrendous and despicable act that can only be described as a cold-blooded and premeditated assassination," prosecutor Peter McCormack told the court as relatives of the victims looked on.

"The defendant ran up behind both of them and pumped numerous bullets into them striking them both in the head ... leaving them lying in the street mortally wounded," he said.

Authorities said on Tuesday that the suspect's motive remained unclear, and the possibility it was a hate crime was one theory being explored.

Morel, from the borough of Brooklyn, appeared calm and spoke little during his brief appearance. He agreed that surveillance video showed him at the scene of the murders earlier on Saturday, but denied being the killer.

Judge Karen Gopee set his next court date for Thursday, when an attorney will be assigned to represent him.

Speaking to reporters at the court, Uddin's brother, Mashuk Uddin, said the families of both victims were devastated.

"Everybody is very upset," Uddin said, adding that he believes it was a hate crime. "These two people here being killed at one time? What's the reason? There's only one reason (and) that's the hate crime."

Outside court, several relatives of the dead men as well as friends and locals held signs reading "We demand justice."

SUSPECT CAUGHT ON CAMERA

Robert Boyce, the New York Police Department's chief of detectives, told a news conference on Monday that surveillance video showed the suspect getting into a black sport utility vehicle after the shootings.

That vehicle was involved in a hit-and-run three miles (5 km) away in Brooklyn shortly afterward. After officers located the SUV, the suspect rammed a detective's car several times in an attempt to escape, but was arrested, Boyce said.

He said the suspect is believed to have worked at a warehouse in Brooklyn.

Citing unnamed police sources, the New York Times, the New York Daily News and other outlets reported on Tuesday that detectives who searched Morel's basement apartment in Brooklyn found an unlicensed revolver hidden in a wall that authorities believe he used in the execution-style killings.

Police also found clothes in his apartment that matched what the gunman had been wearing, according to the media reports.

Police confirmed in a statement on Tuesday that a .38 caliber Taurus revolver was recovered in connection with the investigation, but did not say where the firearm was found.

Akonjee and Uddin were shot in the head at close range after leaving Saturday prayers at the Al-Furqan Jame Mosque in the Ozone Park neighbourhood of Queens.

Addressing hundreds of mourners at the two men's funeral on Monday, Mayor Bill de Blasio promised the city would bolster the police presence in the neighbourhood.

A father of seven, Akonjee emigrated to the United States from Bangladesh several years ago, said Badrul Khan, the founder of the Al-Furqan Jame Mosque. He described the slain imam as a humble man who lived and breathed his religious faith.

"His whole life was his job, praying here, then going home," Khan said.