A Uniondale construction worker was fatally gunned down outside his home by a man he grew up with in the same small village in El Salvador and whom he considered a friend, police and the victim’s family said Wednesday.

German Ismael Saravia Melendez, 37, of Uniondale, was fatally shot several times in the head and back outside his home near the intersection of Macon Place and Irving Place about 9:44 p.m. Monday after an “apparent dispute,” police said.

Nassau police received a ShotSpotter gunfire detection notification and a witness called 911 and described the suspect’s fleeing vehicle, police said.

A pair of First Precinct police officers — Christopher DiGregorio, who was driving, and Gary Butt — spotted the car and arrested Joel Arquimides Ayala Deras, 35, of Fourth Avenue, Westbury, police said.

The cops spotted a .44-caliber handgun on the floor of Deras’ vehicle and shotgun shell casings on the passenger seat, police said. A subsequent search of the car found a .380-caliber handgun and a shotgun, which police believe is the murder weapon.

Deras, who worked as a landscaper and played in a soccer league with the victim, was arrested within minutes of the shooting and charged with second-degree murder, police said. He pleaded not guilty and was held without bail at his arraignment in First District Court in Hempstead, a spokesman for the Nassau district attorney said.

advertisement | advertise on newsday

Deras was represented by an attorney from the Legal Aid Society, which does not comment on cases.

Acting Police Commissioner Thomas Krumpter said the motive in the slaying — the first in Nassau this year — was still being investigated, but confirmed that Melendez and Deras knew each other. Neither man has a criminal record, Krumpter said.

Krumpter said the combination of a witness calling 911, alert police officers and ShotSpotter were integral to making an arrest.

“The ‘no snitch’ [code] is obviously being diluted, and we’re getting the support of the community at a level we have not seen in a very long time,” Krumpter said.

Melendez’s heartbroken brothers said at their Hempstead home Wednesday that they grew up with the suspect in Caserio Las Victorias in their native El Salvador and are shocked that he stands accused of murdering their brother, who considered Deras a friend.

Melendez’s younger brother, Pedro Melendez, 29, said: “We grew up together. We have no idea yet” why Deras would shoot his brother.

Their brother, they said, was hardworking and had come to the United States in 2002 for job opportunities. He leaves a 16-year-old son in El Salvador.

Jose Freddie Saravia, Melendez’s oldest brother, said his brother helped support his son and parents by sending money home.

Saravia also tearfully recalled the good times he and his brother had.

“Herman was my hero,” said Saravia, 40. “The guy — he worked hard. All the time, we’re joking. We play together. We sing karaoke together. Some time we drink together. That [his brother’s killing] happened — it destroyed my heart.”