Even a gathering to remember a 12-year-old girl who died from asthma wasn’t spared from the violence that swept through Brooklyn over the weekend.

Nine people were shot early Sunday when gunmen tried to crash an East New York house party being held in memory of Shimia Gibson, who died three years ago, sources said.

The perpetrators are believed to be gang members who likely learned of the party through Facebook posts, the sources said.

The shooters unloaded a barrage of bullets after they were turned away from the duplex on Stanley Avenue near Crescent Street, turning the festive atmosphere into chaos, witnesses said.

“[There were] big pools of blood in the street,” said Mahdi Alabdi, 52, a clerk at nearby Gourmet Deli. “Nine people were laying out here in the street bleeding.”

Alabdi added that he could hear the cries of the victims, including one woman who was screaming, “I got shot! I got shot!”

“This is a bad neighborhood, very dangerous,” he said. “But [I] never see this kind of thing before.”

Another neighbor, Faylo Alston, 43, described the horrible scene.

“There were bodies on the ground,” Alston said. “Everybody was laying down until the shooting stopped and then they got up and scattered. They looked afraid.”

The bloodshed came at around 2:30 a.m., moments after an argument erupted between the unwelcome guests and some partygoers in front of the home, sources said.

When the men tried to storm into the home’s back yard, where people were gathered, at least one of the intruders pulled out a gun and started shooting, striking six women and three men between the ages of 17 and 38, the sources said.

A 24-year-old man and a 21-year-old woman were each shot in the neck. All the other victims suffered wounds to the arms, legs or buttocks.

They were transported to area hospitals and are all expected to survive, officials said.

Police managed to chase down three men — ages 17, 18 and 56 — who were seen fleeing and took them into custody, sources said. The men have not been charged.

Police on Sunday were also trying to locate the weapon, which is believed to have been dumped in a nearby housing project.