BANGOR — A California man has been sentenced in Maine to 25 years in prison for operating an interstate drug ring while serving time in a California prison, prosecutors said Tuesday.

Mark Razo, 24, of El Monte., Calif., was sentenced Monday in U.S. District Court in Bangor.

A jury convicted Razo following a five-day trial in March on one count of conspiracy to distribute heroin, cocaine, marijuana and methamphetamine, and three counts of unlawful use of a telephone.

Razo used contraband cellphones from inside a prison in Jamestown, Calif., where he was serving time for another drug-related conviction, to set up drug transactions, recruit couriers and arrange for the drugs be transported, according to a statement from the U.S. Attorney’s office in Maine.

His operation was uncovered in 2011 by drug agents in Portland, who learned while listening to a court-approved wiretap that Razo had arranged for a 4-pound methamphetamine shipment to Iowa, which law enforcement personnel later seized in Ottumwa. The agents further learned that Razo arranged for other drug shipments across the U.S.