A former New Haven, Connecticut, man was sentenced Friday in federal court in Bangor to 25 years in prison and five years of supervised release for conspiring to distribute crack cocaine and conspiring to violate federal gun laws.

The office of U.S. Attorney Thomas E. Delahanty II said the man, Christian Turner, 29, also known as “P,” was a member of the Red Side Guerilla Brimms, a New Haven street gang affiliated with the Almighty Blood Nation. He pleaded guilty to the charges last September.

According to authorities, Turner conspired to distribute 280 grams of crack between January 2010 and August 2013 in Penobscot County and elsewhere in Maine, selling it for $80 a gram. The proceeds, Delahanty’s office said, went back to the gang in New Haven to finance gang activities.

In addition to dealing drugs, Turner also pleaded guilty to buying 25 guns illegally, paying for them with cash and drugs. Some of the guns were bought were through straw purchases at Maine gun shops and others through private transactions. The guns, Delahanty’s office said, were taken back to New Haven and distributed to others.

“The message to those people like members of the Red Side Guerilla Brimms is this: stay away from Bangor,” U.S. District Judge John A. Woodcock Jr. said in handing down the sentence.