Sign up for our COVID-19 newsletter to stay up-to-date on the latest coronavirus news throughout New York City

Police tape at an undated crime scene. Photo Credit: AFP / Getty Images / Kena Betancur

A Brooklyn man was charged with accidentally shooting and killing his friend while showing off his gun, police said, as the blizzard whipped outside.

At about 8 p.m. on Saturday, as the snow tumbled down throughout the city, 32-year-old Maciej Gorecki allegedly went to his friend’s Sunset Park apartment to show off his gun, a law enforcement official said.

Gorecki, who thought the gun was unloaded, allegedly held it up to 37-year-old Golabek Zdzislaw’s head and pulled the trigger, a law enforcement official said.

But the gun was in fact loaded and Zdzislaw was found inside the 45th Street apartment and pronounced dead.

Gorecki was charged with manslaughter and second-degree criminal possession of a weapon, police said.

Arraignment information for Gorecki was not immediately available.