Bad blood between rivals for the same woman’s affection sparked tension that led to a deadly 2014 shooting outside a Long Beach public housing complex, a Nassau County prosecutor said Thursday as the accused killer’s trial began.

Antonio Webb, 24, is on trial for second-degree murder and gun charges in the slaying of Tyrenzo Brown, 28. Both men lived in Long Beach.

The Sept. 27, 2014, shooting was on Birch Court in the city’s federally subsidized Channel Park Homes complex, where some community members rallied after the killing to call for more police intervention and better security.

The 12:45 a.m. shooting that left Brown dying on the sidewalk was the second outbreak of gunfire during the same party at the complex, prosecutor Martin Meaney told jurors in Nassau County Court in Mineola.

In the first shooting, the prosecutor said Webb’s rival, Maurice Wilson, got into a heated dispute with a friend of Webb’s before that friend and another man opened fire. That time, bullets didn’t hit anyone.

Police responded and everyone scattered, but people came back outside after officers left, Meaney said. A short time later, Webb returned in a dark hoodie and fired a gun repeatedly, fatally wounding Brown, a friend of Wilson’s, the prosecutor said.

advertisement | advertise on newsday

Meaney said Wilson then returned fire. Wilson — who became a cooperating prosecution witness — is one of three people who will identify Webb in court as the killer, the prosecutor said.

Meaney acknowledged that Wilson, who told authorities he shot back at the gunman, has a criminal record and his office had negotiated a deal for his testimony.

Webb’s defense attorney, Jeffrey Groder of Mineola, told jurors there is no forensic evidence linking Webb to the homicide, and the prosecution is relying on witnesses whose testimony can’t be trusted.

“The character of some of these witnesses will disturb you because some of them have no character at all,” he said.

Groder told jurors Wilson, 25, was a convicted drug dealer who spent two years behind bars under his cooperation deal. He said Wilson also could get his felony conviction from the case dismissed for helping the prosecution, when he originally could have faced 15 years in prison.

The defense attorney said one of the other witnesses who would identify his client as the shooter had an account that “evolved” over time, and the third witness he expected to point a finger at Webb as the killer is related to the victim.

Meaney said police arrested Webb in the same neighborhood days after the homicide when a stakeout paid off. He said police spotted Webb with a gun, giving chase unsuccessfully at first, before later arresting Webb in the same area.

Testimony resumes Tuesday. Webb faces 25 years to life in prison if convicted of the top count.