A man grabbed an NYPD officer's gun and shot and killed a store clerk in the Bronx early Tuesday morning, moments before he was shot and wounded by another officer, police said.

The man, identified as Efrain Guzman, 30, was in a physical argument with workers inside A&M Deli, a bodega on East 198th Street and Valentine Avenue in Bedford Park, shortly after 1 a.m., police said. One of the workers was a 49-year-old employee of a deli across the street, who had followed Guzman into the other bodega after having a prior dispute with him, they said.

Officers arrived at the scene and when they were escorting Guzman out, he was able to grab a cop's gun out of the holster and fire it multiple times, police said. Police believe the store clerk, who has not been identified yet, was hit by one of the bullets. Cops said he was pronounced dead at St. Barnabas Hospital. 

The officer whose gun was not taken shot at Guzman, hitting him twice in the torso, police said. Guzman was taken to St. Barnabas Hospital in stable condition. 

No officer was hurt, police said.