A Prince George’s County man has been sentenced to 22 years in prison in the fatal shooting of a man he mistakenly thought had earlier been part of a late-night sidewalk brawl outside a Dupont Circle nightclub.

Brandon Terry, 30, of Riverdale pleaded guilty this month in D.C. Superior Court to second-degree murder and assault in the Nov. 27 killing of Jhonte Coleman, 34, and the wounding of two other men. Terry was arrested in February and almost immediately said he was remorseful and wanted to plead guilty. Both sides agreed to the prison term announced Friday.

Prosecutors said that the violence occurred at a Thanksgiving weekend party called “Black Out” at the Heritage India Brasserie and Lounge on Connecticut Avenue NW. The men had all been in the club, where fights had erupted — including involving Terry — and the club was closed early, a few hours after midnight. The fighting continued on the sidewalk, and Terry mistakenly believed that Coleman, a Suitland resident, and a friend of Coleman’s were connected to those with whom Terry had clashed.

Terry, according to U.S. Attorney Ronald C. Machen Jr., “approached the two men with a pistol and shot them repeatedly.” A third man was also hit. Coleman died that morning; the other two survived.