The Metropolitan Police Department has released surveillance video capturing an early morning drive-by shooting in Northwest D.C. on camera. Eleven people were injured when gunmen opened fire in front of a crowd outside an apartment building. (The Washington Post)

A drive-by shooting on North Capitol Street in March that left 13 people injured was a spillover from a fight at a nearby club called Fur, a D.C. homicide detective testified Friday.

Police previously had said two rival gangs were involved in the shooting but had not said the gangs had a confrontation at the club beforehand.

Also at Friday’s hearing, prosecutors revealed that their initial account of the shooting came from one witness, who also is charged in the case and is cooperating.

At the hearing in D.C. Superior Court, prosecutors identified the witness only as Witness 4, but court records reveal him to be Craig S. Wilson, 19, who was arrested just days after the shooting. He was wearing a court-ordered Global Positioning System bracelet for a 2012 theft conviction and was on probation at the time of the shooting. For months, Wilson was the only suspect.

In May, police arrested Wilson’s friends Andrew D. Allen, 19, of Southeast and Keith D. Bobb, 21, of Northeast and charged them with conspiracy and assault with intent to kill.

Wilson is cooperating with police, and at Friday’s preliminary hearing for Allen and Bobb, additional details emerged about the shooting.

D.C. homicide detective Joseph Della-Camera testified that Wilson, Allen and a third, unidentified man were at Fur, just off New York Avenue, when a fight occurred. After the fight, the men left the nightclub and picked up Bobb. The men, two in one car and two in another, drove to the Tyler House apartments, where their attackers, who were part of a rival gang, hung out.

The shooting occurred just after 2 a.m. outside the subsidized apartments. Police recovered 38 9mm shell casings along the 1200 block of North Capitol Street NW, fired from two cars, and 15 .40-caliber casings near North Capitol and M streets, fired from the street. The shooting was captured on surveillance video, which was aired on local media.

Prosecutors argued that both cars had a shooter on the passenger side.

In addition to Wilson’s GPS bracelet, police were also able to identify him through his cellphone records. He later gave police a statement admitting his role in the shootings, prosecutors have said.

Attorneys for Allen and Bobb argued that the victims were not able to identify their attackers. Police have not found any guns linked to the shooting. Both lawyers attacked Wilson’s credibility as a cooperating witness. “He has every incentive to finger somebody he’s been friends with,” argued Allen’s attorney, Jenifer Wicks.

“He’s trying to curry favor with the prosecution,” said Bobb’s attorney, Brian McDaniel.

Assistant U.S. Attorney Thomas Bednar argued that prosecutors had additional evidence, other than Wilson’s cooperation, including Allen’s torching of his own car, which Bednar argued was “consciousness of guilt.”

Judge John Ramsey Johnson ordered Allen and Bobb to remain in jail until their next hearing, in October.

Details of the March shooting are very similar to those of a 2010 drive-by shooting in the District.

In March 2010, five people were killed and eight were injured during a series of shootings, including a drive-by, outside an apartment building in the Congress Heights area.

Assistant U.S. Attorney Michael Brittin, who was the lead prosecutor in the South Capitol shootings, is the lead prosecutor in the North Capitol case. And prosecutors in both cases relied heavily on the cooperation of one of the shooters, as well as cellphone records. Six men were convicted in the South Capitol shootings and were sentenced to prison terms from 25 years to life.