Friday night did not go as planned for Frank Giardina.

Around 11:05 p.m., police officers came to his third-floor apartment in Flushing, Queens, to check on a noise complaint someone called in to 311. The officers knocked on the door and, the police said, Mr. Giardina, 49, came to the door with a marijuana pipe in his hand, a telltale odor emanating. When asked about the smell, he replied, “Oh, that’s weed,” according to the officers.

First mistake.

The officers, seeing the pipe, requested his identification to write him a summons, the police said, and Mr. Giardina obliged, inviting the officers into his home while he fetched his ID.

That was a critical second mistake, because, the police said, when the officers entered the apartment, they took a look around and saw something significantly more interesting than a pot pipe: about five pounds of what looked like heroin sitting on the kitchen table.

It was not clear whether Mr. Giardina, who the police said had no arrests before Friday, said anything to the officers to explain the apparent presence of a significant quantity of narcotics on the table. But they soon arrested him, got a search warrant and performed a more thorough search of the apartment, turning up still more heroin, in 1,948 glassine bags, along with materials used for packaging, the police said.