The head of security at the Baltimore jail failed a polygraph test administered after a federal indictment alleged widespread corruption on her watch, corrections secretary Gary D. Maynard told lawmakers at a hearing in Annapolis.

Shavella Miles is the only person to have been removed following the allegations, but an internal inquiry has progressed down the ranks with all jail employees subject to review. Maynard said Thursday that the supervisors of 13 corrections officers charged in the federal case are under investigation.

A federal indictment unsealed in April alleged that the Black Guerrilla Family gang, under the leadership of inmate Tavon White, set up a sophisticated smuggling ring at the Baltimore City Detention Center with the help of corrections officers. The allegations sparked criticism and a flurry of activity to restore order and eradicate corruption at the troubled facility.

The case also prompted the hearing in Annapolis, where lawmakers questioned Maynard for more than an hour. The corrections secretary spoke extensively about the influence gangs wield in the state's jails and prisons. He provided a more detailed timeline of when the state knew it had a problem with the Black Guerrilla Family at the jail and what officials were doing about it during the long federal investigation.

House Speaker Michael E. Busch said the state still has much work to do in fixing corrections facilities and announced a 14-member legislative commission to study Maryland's system and the laws and regulations that govern it.

"Obviously it was somewhat of an eye-opening presentation for many of the legislators," he said after the hearing.

Among the fallout, security chief Miles — the third-most-senior official at the jail — was forced from her job. Through her lawyer, Russell A. Neverdon Sr., Miles has denied wrongdoing and said she is being treated as a scapegoat for broad institutional problems. He could not be reached to comment Thursday.

State officials have launched a series of efforts to reform the system, including plans announced this week by Gov. Martin O'Malley's administration to subject all prospective corrections officers to polygraph tests and to bolster an internal investigations unit at the state Department of Public Safety and Correctional Services. Maynard has moved his office to the Baltimore jail to oversee efforts there.

"He has a pretty daunting job," Busch said of Maynard.

Approached by O'Malley to take over the state's prisons, Maynard recounted how a colleague warned him off the job, saying he would never be able to overcome the corruption the system was reputed to suffer.

In the first years of O'Malley's administration, Maynard swiftly moved to shut down the troubled House of Correction in Jessup. Federal authorities brought charges against Black Guerrilla Family members operating in the state's prisons in 2009. Then in late 2010, the FBI and the U.S. attorney's office suggested investigating the gang's activities and corruption at the jail.

Early the next year, state officials set up a task force to look at the issue. Maynard said he knew getting outside agencies involved could subject the department to "intense public criticism" if problems were uncovered, but he decided to go ahead because "it's the right thing to do."

U.S. Attorney Rod J. Rosenstein and Baltimore's former FBI head, Richard A. McFeely, were invited to attend the hearing but declined to do so. Rosenstein cited the ongoing investigation.

The task force continued its work for two years, eventually securing wiretaps on contraband cellphones that federal authorities said inmates used to coordinate their activities.

Del. Nicholaus R. Kipke, the Republican leader in the House, asked what Maynard was doing while the federal authorities built their case.

"It's surprising to me ... that you were just waiting around for two years for another investigation to go on," he said.

But Maynard said that while the FBI asked the department not to move certain inmates or corrections officers, his staff did not turn a blind eye to problems in the jail.

"We were working all the time," he said. A new administrator was appointed, Maynard said, and some corrections officers were transferred.

The federal indictment was unsealed in late April, and the allegations of drugs, gangs, sex and corruption attracted national attention. According to authorities, inmates who were gang members with the Black Guerrilla Family, or BGF, were smuggling cigarettes, drugs and cellphones in to the jail, and four corrections officers became pregnant by White while he was incarcerated.

Gov. Martin O'Malley was on a trade mission in Israel at the time. In a series of emails to Baltimore Mayor Stephanie Rawlings-Blake, the governor said he was "really pissed" that he was out of town when the case was announced. The emails were obtained Thursday by The Baltimore Sun under a public information request.

O'Malley told Rawlings-Blake in an email that she should not read from the indictment that the state was "asleep at the switch" in running the city jail.

"There's a lot to this investigation," he wrote. "Not withstanding the half-hammed way the press roll-out was handled. Best case we've ever had against BGF. And it's not done."

In the days after the indictment was unsealed, Maynard moved his office from Towson to the jail and began subjecting senior administrators to polygraph tests.

"We came upon the security chief who didn't pass the polygraph and the interview," Maynard said.

Asked by Sen. Nathaniel J. McFadden, a Baltimore City Democrat, whether any supervisors knew about the activities alleged in the federal case, Maynard said, "I would think that some did."

Investigators are asking "who was that person's supervisor and what did they know about what was going on," Maynard said.

Maynard predicted more people would be forced from their jobs but did not promise quick results. "It will be more than one month," he said. "It's a slow process."

Union officials, who sat in on the hearing but did not testify, said they support the department's attempts to stamp out any remaining corruption. Glenard S. Middleton Sr., executive director of AFSCME Council 67, which represents corrections officers at the jail, declined to comment on whether the union was cooperating on any internal investigation.

"The staff is glad corruption is being dealt with," Middleton said.

At the hearing, lawmakers also discussed putting the city jail under the control of an independent entity, an idea the legislative commission is likely to explore.

Baltimore City State's Attorney Gregg L. Bernstein and Baltimore County State's Attorney Scott Shellenberger also discussed problems posed by contraband cellphones, which they said can be used to orchestrate crime outside the jail. Shellenberger advocated granting police powers to more corrections department investigators so they can arrest corrupt officers.

As the internal investigation at the corrections department continues, the General Assembly plans to explore legislative fixes and whether more money should be allocated to address the problems.

Del. Guy J. Guzzone, one of the chairs of the new commission, said in an interview that "everything's on the table. If you can think about it we'll talk about it."

But to get public support for spending more on jails, Guzzone, a Howard County Democrat, said legislators need to show that improving safety behind bars would cut down violence on the streets.

"It's not simply about jails, it's about gangs in the community," he said.