The Baltimore City Detention Center. (Michael S. Williamson/The Washington Post)

Maryland lawmakers are expressing a range of reactions — from outright anger to qualified support of the O’Malley administration — following allegations that state prison guards helped a gang operate a drug-trafficking scheme from behind bars at a Baltimore jail.

Del. Curtis S. Anderson (D-Baltimore) called Tuesday’s racketeering indictments by federal prosecutors “just horrific” and asked for further explanation by Gov. Martin O’Malley (D) and Gary D. Maynard, head of the agency that oversees Maryland prisons.

According to the indictment, guards at the Baltimore City Detention Center allegedly helped leaders of the Black Guerilla Family gang run a criminal enterprise by smuggling cellphones, prescription pills and other contraband into the facility in their underwear, shoes and hair.

“I think it reflects poorly on the warden of that facility, on the secretary of public safety and on the governor himself,” said Anderson, chairman of the Baltimore delegation in Annapolis and a member of the House Judiciary Committee. “I think the governor needs to have a long conversation with Maynard and find out what the hell went wrong. There need to be some changes.”

Other lawmakers were more sympathetic toward O’Malley and Maynard, who took responsibility for the problems Tuesday, telling reporters: “It’s totally on me. I don’t make any excuses.”

View the indictment in the case.

The indictments arose in part from a task force in which state officials participated alongside federal prosecutors.

Sen. Brian E. Frosh (D-Montgomery), chairman of the Judicial Proceedings Committee, said the O’Malley administration deserves credit for taking part in a “very bold, aggressive and appropriate” prosecution.

“I wish all that stuff weren’t going on in Maryland prisons, but I’m glad that the U.S. attorney and the governor are pursuing it aggressively,” said Frosh, who is considering a run for attorney general next year. “Jails are full of criminals, and they engage in criminal activity. The question is how you best manage it.”

Frosh said Maynard has generally been well regarded by lawmakers since his arrival in Maryland in 2007. O’Malley tapped him for his cabinet after stints running the prison systems in Iowa and South Carolina. Maynard is also a past president of a national association of prison officials.

“My impression of Maynard is he’s very impressive, hands-on and knows how to run a prison system,” Frosh said.

Maynard also won a vote of confidence Wednesday from Sen. Christopher B. Shank (R-Washington), a member of the Judicial Proceedings Committee, who has worked on several issues related to prisons.

“It’s very disconcerting that this level of corruption occurred,” Shank said. “But until I hear otherwise, I have full confidence that Gary Maynard is going to get to the bottom of this. I know he’s a committed reformer.”

Del. Keiffer J. Mitchell Jr. (D-Baltimore) said he, too, remains confident in Maynard’s leadership but expects that during its next session, the legislature will look at ways to crack down on contraband brought into prisons and hiring standards for prison personnel.

“For this to make national news, frankly, it’s embarrassing,” Mitchell said.

The indictments came at a politically sensitive time for O’Malley, who is weighing a 2016 presidential bid.

“We have zero tolerance for corruption among correctional officers, and we will continue striving to make all correctional facilities as secure as they can possibly be,” O’Malley said in a statement Tuesday.

Don Norris, a public policy professor at the University of Maryland Baltimore County, said any political fallout from the episode for O’Malley will likely be determined by “how he handles this, whether he gets out in front of it.”

“If the state were riddled with incompetence and corruption, that’d be one thing,” Norris said, “but it’s not. ... This kind of thing happens in all prison systems, though maybe not this flagrant.”

Ann E. Marimow contributed to this report.