A Brooklyn man was arrested Monday night in connection with the execution-style shootings of a Queens imam and his aide Saturday, the NYPD said.

Detectives walked a handcuffed Oscar Morel out of the 107th Precinct in Flushing into a waiting unmarked sedan just after 10:30 p.m. Monday. He was then driven to central booking in Queens and is expected to be arraigned Tuesday.

Detectives had been questioning Morel, 35, of Miller Avenue, at the station house since taking him into custody Sunday night on unrelated hit-and-run charges, police said.

Morel faces two counts of second-degree murder and criminal possession of a weapon, police said. He did not answer reporters’ questions about the slayings, including whether the men were shot because they were Muslim, before ducking into the sedan.

His arrest capped a day that saw NYPD detectives search his Brooklyn residence for evidence hours after thousands attended the funeral of the men he is accused of shooting to death, Imam Maulana Akonjee, 55, and his aide Thara Uddin, 64.

Earlier Monday night, NYPD officials said they were compiling the evidence and conducting a suspect lineup at the 107th Precinct for witnesses.

“We believe because of the evidence we have acquired thus far that we strongly believe this is the individual,” NYPD Chief of Detectives Robert Boyce said at a news conference Monday night with Mayor Bill de Blasio and Police Commissioner William Bratton.

advertisement | advertise on newsday

After serving a search warrant Monday at Morel’s Brooklyn residence, detectives recovered a revolver-style handgun like the one used in the shooting, as well as pieces of clothing that matched items recovered at the crime scene, police said.

Detectives took Morel into custody late Sunday after piecing together circumstantial evidence, including a description of an SUV involved in a hit-and-run crash shortly after the killings, officials said. The vehicle matched the description of the SUV witnesses said left the scene of the slayings.

Both men were shot in the back of the head Saturday afternoon as they walked in traditional Muslim garb at the corner of Liberty Avenue and 79th Street in Ozone Park, Queens, after leaving prayer services at the al-Furqan Jame Masjid mosque, where Akonjee was imam.

A man, later identified as Morel, initially talked with NYPD detectives at the 107th Precinct but then clammed up, a source said.

Morel remained in custody Monday night, charged in the hit-and-run crash, as well as the ramming of a police car before his arrest, Boyce said.

Outside the 107th Precinct, Abbas Patel, 63, a Muslim resident of Fresh Meadows, Queens, who was out for his nightly stroll, said he was relieved at news of the arrest. Patel, dressed in traditional Muslim garb consisting of a long white tunic and kufi cap, said it eased his mind.

“I’m walking and something could happen to me,” said Patel, a retired environmental engineer originally from India. “That’s good. The police did an excellent job.”

At the Brooklyn funeral Monday for the victims, many held signs reading “Stop Hate Crimes” and “Muslim Lives Matter” and chanted for justice. Since the killings, a number of Muslims said they believe the slayings were hate crimes.

Boyce said detectives have yet to establish a motive but “that is certainly on the table, a hate crime. Right now we can’t explain why this person was there.”

At the funeral, the divisive nature of the presidential race and GOP candidate Donald Trump’s call for a ban on Muslim immigrants were on the minds of many.

advertisement | advertise on newsday

“We‘re not going to listen to those voices who try to divide us. We will stand up to them each and every time,” de Blasio told the large crowd at the funeral. “We will make sure that whoever did this is brought to justice, I can guarantee you that.”

De Blasio described Akonjee and Uddin as “examples of goodness and righteousness. They were examples of peace and understanding.”

City Comptroller Scott Stringer and Public Advocate Letitia James also attended the funeral.

After the service, which was attended by an estimated 2,500, according to the NYPD, the body of Akonjee was to be flown back to his native Bangladesh. Uddin was to be interred at a cemetery in New Jersey.

The solemn event took place in the aftermath of an intense 48 hours of law enforcement activity as detectives searched for leads in the killings.

advertisement | advertise on newsday

Video surveillance cameras captured the killings and since Saturday, investigators were able to quickly interview witnesses. That information gave detectives enough information to generate a sketch of the shooter and the make and model of the SUV witnesses told them he used to flee the scene.

Sunday, a detective came up with a report of the hit-and-run crash that occurred about 10 minutes after the shootings and about 3 miles away, involving a cyclist struck by a black Chevrolet TrailBlazer.

The vehicle description matched the color of the SUV described by witnesses and license plate numbers taken down by the cyclist and given to detectives led them to a Brooklyn address listed on the registration. Investigators could not locate the SUV so they canvassed blocks near the hit-and-run crash and discovered the parked vehicle, officials said.

Then, in a stakeout reminiscent of a scene from the movie “The French Connection,” police watched the car until a man entered it around 10 p.m. Sunday. An unmarked police vehicle drove up and boxed in the TrailBlazer and the driver made a futile attempt to ram it.

Morel was then apprehended and brought to the 107th Precinct, Boyce said.

CORRECTION: An earlier version of this story misspelled the imam’s name, Maulana Akonjee.