An enraged man who was pistol-whipping the mother of his young child was gunned down by Nassau County cops on a leafy Long Island block early Wednesday, neighbors told The Post.

The creep refused to drop his gun when cops pulled up to the couple’s Merrick home on tree-lined Murray Place around 1:45 a.m., forcing police to squeeze off at least two shots, multiple neighbors said.

The 43-year-old man was shot at least one time above the chest and died at an area hospital, according to Nassau Police Department Det. Lt. Richard LeBrun.

Officials didn’t immediately confirm the man’s identity.

Before cops put an end to the assault, neighbors awoke to the woman running up and down the block, frantically pounding on doors and pleading for help.

“She was out on the street banging on neighbors’ doors, screaming for help,” said one woman who lives on the block, declining to give her name.

The neighbor described the deceased as a “very serious guy” and said that he and his victim had a young child in common, approximately 4 years old.

“The neighbors were all out in the street when cops arrived,” said another neighborhood resident. “They told everyone to get back in the house, and I heard two gunshots.”

She described the alleged abuser as “a little bit crazy,” adding that he owned “a lot of guns.”

Neighbor John Mucaria, 57, came running out of his house when he heard helicopters circling overhead.

“It’s crazy. I feel bad for the family,” said Mucaria. “Things get out of hand so quick.”

Nassau police confirmed that they were investigating a police-related shooting on the block but didn’t provide further details about the sequence of events.