The orchestrated by the Glen Cove Police Department was traced to a foreign manufacturer and has no history in the United States, according to department spokesman Lt. Tom Fitzpatrick.
"It appears the gun was smuggled into the U.S.," Fitzpatrick said in an email.
He said the firearm's make, model and serial number were entered into a nationwide database, as is done with any illegal gun obtained by the department to determine where it came from, who it is registered to and if it was stolen.
Hector Morales, 31, of Glen Cove was charged with the sale. He was found to have reentered the country illegally since his deportation to El Salvador from New York in 2000.
The gun was loaded at the time of the alleged sale, police said.