NYPD cops sent a robbery suspect’s rental car back to Avis with a handgun stashed next to the battery — because they missed the weapon while searching it for evidence, sources told The Post on Friday.

The 13th Precinct cops seized the SUV in early October when they brought in a man wanted in connection with a string of at least six Manhattan street robberies that began in August, sources said.

Cops got a warrant to search the SUV, but the Evidence Collection Unit came up empty.

One robbery victim then failed to pick him out of a lineup, and the Manhattan District Attorney’s Office dropped the charges, cops said.

The SUV remained parked on a public street outside the precinct station house — with the gun still under the hood — for more than a month before it was brought back to the rental company.

Workers there couldn’t start the SUV, so they checked the battery — and found the .22-caliber handgun.

They called police, who are now testing the gun for DNA and fingerprints.

An NYPD spokesman confirmed that investigators had searched the vehicle, but he said the gun “may have been in a place where it was not readily visible.”

The suspect is believed to be part of a stickup crew that has targeted white men in affluent Manhattan neighborhoods, stealing Rolex, Patek Philippe and other watches.

One 22-year-old man was robbed outside the Meatpacking District hot spot 1 Oak on Sept. 19.

Another man had been held up by two of the robbers just a day earlier, sources said. Staring down the barrel of a silver revolver, he handed over his watch, phone and wallet.

The most recent stickup took place in Midtown on Oct. 28, when a 51-year-old man was approached by one of the robbers and was offered drugs and directions to a bar.

When the man refused, they pulled a pistol on him and forced him to hand over his watch.