May 20, 2021 | 2:40am | Updated May 20, 2021 | 7:24am

Two people were killed, and at least nine others injured, in a gory stretch of violence across New York City on Wednesday night, police and sources said.

The bloodshed included 7 gunshot victims, including an 8-year-old boy, two people who were stabbed and two more who were slashed across Brooklyn, Queens and Manhattan, according to police and sources.

One of the fatal victims was a 27-year-old woman who was fatally stabbed by her ex-boyfriend in her Harlem apartment at about 8:45 p.m., according to police.

Amid the struggle, the woman was also able to stab her attacker, once in his neck and another time to his chest, according to police and sources. He was left in critical condition.

The other fatal victim was a 33-year-old man who was shot dead inside an East Flatbush building about two hours later.

In St. Albans, Queens, a drive-by shooting at about 9:45 p.m. left three people wounded, including the 8-year-old boy and his 39-year-old father. A 57-year-old man was also hit by the gunfire.

Three other men were shot, two in Manhattan and one in Brooklyn, according to police sources.

And the rash of subway knifings continued Wednesday night, with a 54-year-old woman randomly slashed inside the 14th Street-Union Square station at about 10:10 p.m.

Additionally in Brooklyn, a man who showed up to Brooklyn Hospital Center with a cut to his face told the staff he got injured during a fight inside the Fulton Street subway station, sources said.

The NYPD’s Sergeants Benevolent Association decried the latest round of Big Apple violence.

“DON’T BLAME US …the Cops didn’t change the laws in NYC the elected officials in NYS and City Council did!!” the group tweeted.