Editor's note: This story has been updated with comment from Debbie Unruh and the governor’s announcement for the new appointment.

Gov. Greg Abbott has replaced another official at the scandal-plagued Texas Juvenile Justice Department, and one juvenile justice reform advocate said the action appears to be in retaliation for the official speaking out about agency flaws.

The Republican governor on Wednesday announced that JD Robertson, a retired major with the Texas Rangers, will replace Debbie Unruh as chief of the independent office that investigates safety complaints by youth in the department's custody. It’s the latest in a string of replacements at the agency as it struggles under sexual abuse scandals and staffing shortages.

“It was a surprise,” Unruh said after she received a call from the governor’s office Tuesday morning letting her know a new appointment would be made Wednesday. “I was not expecting it.”

The Texas Tribune thanks its sponsors. Become one.

Robertson worked for the Texas Department of Public Safety for more than 27 years, according to Abbott’s news release. He formerly served as a commander of the Texas Rangers Special Operations Group, where he managed teams such as the bomb squad and crisis negotiations unit.

Unruh served as the independent watchdog of the Juvenile Justice Department since 2010, according to the state directory. She previously was a jail administrator in Randall County. She said the change could be due to Abbott trying to reorganize during a time of crisis.

“I’m just really alarmed by this because I just can’t imagine she’s going to be replaced by someone with a stronger commitment to protecting youth and raising the red flag,” said Lindsey Linder, a policy attorney at the Texas Criminal Justice Coalition who focuses on juvenile justice issues. “It certainly feels like retaliation for elevating these scandals.”

After reports obtained by The Dallas Morning News revealed arrests and a conviction of guards at the Gainesville State School in North Texas for having sex with committed youth, Unruh has been vocal about her thoughts on what the department should have done about the crisis.

She told the Morning News that the agency should have done more because problems at the lockup had been growing in the last year with staffing problems. She said the facility had a “bad culture.”

A spokeswoman for the department said Unruh's office was not involved in the recent sexual abuse investigation. Unruh said she doesn’t have any indication that her tenure is ending because of retaliation.

The Texas Tribune thanks its sponsors. Become one.

“I believe the governor will appoint somebody who will continue to advocate for the rights of the kids,” she said.

Deborah Fowler, executive director of Texas Appleseed, a nonprofit that advocates for juvenile justice reform, said the agency sees turnover in leadership anytime there's a crisis in the lockups, but that she would be sad to see Unruh go.

"I do worry about the agency losing an advocate like Debbie," she said. "She's really been instrumental in bringing to light some of the problems that exist in the facility."

Abbott oversees the department’s governing board and the independent ombudsman’s office, which Unruh manages. The office investigates noncriminal complaints of youth in TJJD and performs monthly visits and evaluations at each of the state’s five youth lockups.

News of Unruh’s replacement came a day after Abbott replaced the chairman of the the agency’s board. Abbott has been deeply involved in what state senators said was a needed “shake-up” at the agency after a sexual abuse scandal at the Gainesville State School was revealed. His former employee is now the executive director of the department, and he’s directed funds and Texas Rangers to the department to help pull the agency out of crisis.

Disclosure: Texas Appleseed has been a financial supporter of The Texas Tribune, a nonprofit, nonpartisan news organization that is funded in part by donations from members, foundations and corporate sponsors. Financial supporters play no role in the Tribune's journalism. Find a complete list of them here.

Read related Tribune coverage: