CONCORD — A Manchester man will serve 7 1/2 years in federal prison for his role in a drug trafficking operation, federal prosecutors announced.

The case against Gabriel Rivera, 41, also involved charges of possession of a firearm by a felon, according to a statement issued by John Farley, the acting U.S. Attorney for New Hampshire.

According to prosecutors, two raids of a motel room and apartment by police resulted in the confiscation of cocaine, fentanyl and $10,000 in cash. Rivera was arrested along with his roommate, Ramon Guerrero, who had already pleaded guilty to crimes in the case.

“Drug traffickers continue to endanger our community by selling deadly substances,” Farley said in a statement. “When drug dealers are armed, they also present a serious risk of violence.”

In sentencing records, Rivera’s defense lawyer said his client pleaded guilty to two of seven charges he initially faced.

Defense lawyer Richard Guerriero said Rivera was a drug addict who sold drugs for his supplier.

“Most drug addicts who are typically good people who nonetheless wreck not only their own lives but the lives of those around them,” Guerriero wrote.

Rivera was prosecuted under Operation Synthetic Opioid Surge, which was created in 2018 by former U.S. Attorney General Jeff Sessions and designed to address opioid overdoses and deaths in 10 federal districts, including Hillsborough County.