The Metropolitan Police Department has released surveillance video capturing an early morning drive-by shooting in Northwest D.C. on camera. (The Washington Post)

The suspects charged in the mass shooting in March that left 13 people injured on North Capitol Street were hunting for rival gang members they blamed for a series of attacks that included a homicide, according to court documents filed Friday.

Authorities said the four men who are in custody cased out a nightclub off New York Avenue and saw a member of the Sursum Corda/10th & G Street Group. Knowing that patrons often hung out in front of Tyler House, a subsidized-apartment building, after the club closed, members of the 8th Street Group returned there later, armed and in two cars, the documents state.

According to the police account, one suspect said, “Gonna [expletive] the whole Tyler House.” Police said more than 50 bullets were fired during an exchange of gunfire.

The account is the first time authorities have publicly provided an alleged motive in the shooting spree that occurred shortly after 2 a.m. on March 11 and was captured on surveillance video. Police said Friday that they recovered 38 9mm shell casings along the 1200 block of North Capitol St. NW, fired from two cars, and 15
.40-caliber casings near North Capitol and M streets, fired back from the street.

The shooting occurred near NoMa, short for north of Massachusetts Avenue, a quickly developing neighborhood in what used to be a strip of warehouses and clubs one Metro stop from Union Station.

D.C. police arrested the first suspect, Craig Steven Wilson, 19, of Southeast, four days after the shooting and charged him with assault with intent to kill. His trial has been postponed several times, and court documents say he is cooperating with police.

Authorities said Thursday that hey had arrested Andrew Davon Allen, 19, of Southeast and Keith Deangelo Bobb, 21, of Northeast and charged each with assault with intent to kill. A fourth suspect, who has not been named, is in jail in another jurisdiction on an unrelated charge, police said.

The court documents were filed in the latest arrests.

The papers describe the four suspects as longtime friends and members of the 8th Street Group.

The documents state that in recent years, Bobb had been shot and wounded, Allen’s mother had been shot and a 21-year-old acquaintance named Gregory Troxler had been killed. Troxler was shot in October in an alley off Florida Avenue Northeast near Gallaudet University. The court papers say that members of the 8th Street Group blamed the string of violence on the Sursum Corda group.

The court documents describe how the suspects allegedly obtained guns, including semiautomatics with large ammunition magazines. They left the guns in cars while in the club, the Fur Factory, as they searched for the rival crew, the papers say.

The suspects spotted one man they believed to be from the crew, the documents say. That man looked at the suspects, “made shooting motions with his hands, and mouthed the words to the effect of, ‘I’ll kill you all,’ ” according to the court papers.

It is unclear if that man was one of the 13 shooting victims.

Police said that before the shooting, the suspects turned off cellphones to avoid being tracked. But one of the alleged gunmen was on probation and was wearing a court-ordered ankle bracelet, which allowed police to place him at the club and on North Capitol Street at the time of the shooting.