Narcotics officers on Saturday arrested a Staten Island man whose visceral cellphone images of the forceful and ultimately deadly arrest of Eric Garner helped galvanize protests and set off a citywide debate over police practices.

The police charged the man, Ramsey Orta, with two counts of criminal possession of a weapon — a .25-caliber Norton semiautomatic handgun — that the officers said he tried to pass to a teenager on the sidewalk of a drug-prone street blocks from the spot where officers had the fatal confrontation with Mr. Garner.

The officers also arrested the teenager, Alba Lekaj, 17, charging her with possession of the gun and possession of a small amount of marijuana, the police said.

Plainclothes narcotics officers approached Mr. Orta shortly before 10 p.m. Saturday on a stretch of Central Avenue known for drug dealing, the police said, and saw him putting an object into Ms. Lekaj’s waistband. After a search, they discovered the weapon, the police said.