AUSTIN — State lawmakers moved closer to a major overhaul of the scandal-scarred Texas Youth Commission on Tuesday when House lawmakers gave final approval to their version of the bill.

The Legislature has been grappling with how to change the system since reports of sexual and physical abuse at several of the state’s juvenile facilities began to surface earlier this year. Allegations also surfaced that employees knew about the problems but did nothing to stop them.

The House and Senate have now both passed major overhaul bills improving staff-to-inmate ratios, creating strong new investigative powers to look into claims of abuse, and prohibiting courts from sending youths to state lockups for misdemeanors.

Marc Levin, director of the Texas Public Policy Foundation’s Center for Effective Justice, said he was pleased with the legislative action, describing it as a way to “reform a wayward agency that, in many instances, worsened rather than improved the state of the youth in its custody.”

“Key reforms in this bill include an inspector general and ombudsman to provide independent oversight, ensuring that future abuses at TYC are either avoided or rapidly detected and redressed,” Levin said in a statement. “SB103 also specifies that misdemeanant offenders, such as youths convicted of graffiti and alcohol possession, will no longer be sent to TYC. These youths will instead be punished and rehabilitated through community-based residential and day treatment programs that are more effective, save money compared to a TYC placement, and help preserve the family unit.

“Another vital reform in this bill that we have advocated is independent judicial review of the extension of a youth’s minimum sentence at TYC to ensure that the youth still needs to be incarcerated,” he said, noting that one of the factors that contributed to some of the sexual abuse cases is that the superintendents at each facility could use their authority to extend a youth’s placement as leverage if the youth resisted or reported abuse.

Both versions of the bill require inmates to be separated by age and offense and sent to the adult Texas Department of Criminal Justice system when they turn 19.

Both bills establish a family “Bill of Rights” on visitation and contact with inmates and how to file grievances. A new ombudsman office would act as an advocate for inmates.

“The abuse and poor performance identified at the TYC cannot be allowed to continue,” said Rep. Jerry Madden, a Plano Republican who sponsored the TYC overhaul bill.

The House and Senate must still negotiate who will run the agency.

The Senate version favors a governor-appointed commissioner. The House sticks with the current model of an executive director who reports to a citizen oversight board.

Critics have said the previous citizen board, which resigned last month, did not have the expertise or will to deal with pending problems.

The Texas Youth Commission incarcerates about 4,700 offenders ages 10 to 21 who are considered the most dangerous, incorrigible or chronic. An estimated 700 of those are being held for misdemeanors.

The commission operates 15 prisons, nine halfway houses and numerous treatment and counseling centers.

Since the scandal broke, several top officials have resigned and the agency was put in conservatorship. Jay Kimbrough, a former Marine and former aide to Gov. Rick Perry, was put in charge to start reforming the system.

In March, a U.S. Department of Justice review of the Evins unit in Edinburg found the facility violated inmates’ constitutional rights with its “chaotic and dangerous” atmosphere of violence.

A former principal and assistant superintendent at the West Texas State School in Pyote have been indicted on charges they sexually abused teenage inmates. Both have pleaded not guilty.

The TYC overhaul measure is Senate Bill 103.