A Brooklyn transit cop fatally shot a disturbed man who slashed him on the neck Thursday, officials said.

Officer Filippo Gugliara, 24, confronted Oleg Tcherniak, 58, after the man fought with a store owner at West First Street and Sea Breeze ­Avenue in Coney

Island at about 1:15 p.m., law-enforcement sources said.

Tcherniak also assaulted a 78-year-old woman, the sources said.

Gugliara had been at the nearby Ocean Parkway elevated Q-train station when he heard shouts.

He rushed to the scene, where Tcherniak stabbed at him with a hunting knife.

The strap of his bulletproof vest stopped the 11-inch blade, then Tcherniak slashed his neck and ran.

The cop confronted Tcherniak again on Sea Breeze Avenue after a chase and fatally shot him twice in the chest.

Gugliara was then taken to ­Lutheran Medical Center in stable condition.

In December, Gugliara weighed in on the slaying of two cops in Bed-Stuy.

“Two NYPD police officers can’t breathe,” he tweeted, alluding to protesters’ chants over the Eric Garner death.