"It was a legitimate auto shop, but there were a lot of shenanigans going on in the back," Assistant District Attorney Jason Whalley said Tuesday.
Whalley said Messina would invite customers to do drugs in his office and his home in Hatfield. He moved to Upper Gwynedd while he was out on bail.
The investigation involved electronic surveillance and wiretaps on Messina and the other alleged leader, Troy Dudas.
Whalley said he was "absolutely pleased" with Messina's sentence, which includes a mandatory three years in prison for the drugs in his possession and a minimum 21 years under court supervision.
Sean Cullen, Messina's attorney, said his client was remorseful at Tuesday's hearing. "He's not the same person he was a year ago," Cullen said. "He is 100 percent clean and sober."
Messina is the only defendant to receive jail time. Dudas, 36, of Schwenksville, pleaded guilty in November and is awaiting sentencing.
Jeffrey Penna of Hatfield pleaded guilty in February to selling drugs out of his home. He was sentenced to seven years on probation.
His brother David, of Lansdale, also pleaded guilty to distribution and received four years' probation.
The other 28 defendants - from Hatfield, Lansdale, Schwenksville, Royersford, Philadelphia, Harleysville, Collegeville, North Wales, Blue Bell, Telford, Gilbertsville, King of Prussia, and Phoenixville - were "low-level users and sellers," Whalley said.
Most have been sentenced to probation, but a few cases are still pending in Montgomery County Court.
Contact Jessica Parks at 610-313-8117, firstname.lastname@example.org or on Twitter @JS-Parks.