Democratic front-runner Hillary Clinton went to bat for the two national teachers unions Sunday night during the latest presidential debate, accusing critics of "scapegoating" teachers when schools fail.

The statement came in response to CNN anchor and debate moderator Anderson Cooper asking the former secretary of state whether teachers unions protect bad teachers.

In posing the question to Clinton during the debate in Flint, Michigan, Cooper said that union rules often make it impossible to fire bad teachers, meaning disadvantaged kids are sometimes taught by the least qualified educators.

But Clinton, who has won powerful endorsements from both the National Education Association and the American Federation of Teachers, danced around the question.

"A lot of what has happened and honestly it really pains me, a lot of people have [been] blaming and scapegoating teachers because they don't want to put the money into the schools system that deserve the support that comes from the government doing its job," she said.

When Cooper pressed her on whether that meant she does not believe unions protect bad teachers, Clinton conceded that such an assertion is "one of the most common criticisms," but said any action taken should be rooted in analysis done directly by teachers themselves.

"Anything that could be changed, I want them to look at it," she said. "I will be a good partner to make sure that whatever I can do as president, I will do to support the teachers of our country."

To be sure, this was not the first time Clinton has said exactly what the teachers unions want to hear.

Since announcing her candidacy, she has consistently emphasized her eagerness to collaborate with teachers unions – an important strategy coming on the heels of an Obama administration that has done much to fracture the relationship between Democrats and the unions.

Prior to the union question Sunday, both Clinton and her challenger for the nomination, Vermont Sen. Bernie Sanders, were asked about how they would right flailing school districts, specifically in light of problems with the one in Detroit.

The Detroit public school system, which is $3.5 billion in debt and may run out of funding by April, has become a national symbol of neglect and failure over the last few months, with teachers protesting and holding sickouts in response to decrepit facilities.

The specific question was delivered by a parent who has a 14-year-old daughter enrolled in a Detroit school and is one of multiple parents suing the school system.

In response, Sanders used the blighted school system as a prime example of why he would increase taxes on wealthy individuals.

"We have a Republican leadership in Congress now fighting for hundreds of billions of dollars in tax breaks for the top two-tenths of 1 percent, but somehow we can't come up with the money to fix Detroit's crumbling public school system," he said. "Somehow we cannot make sure that Detroit has qualified and good teachers."

"We have got to change our national priorities – no more tax breaks for billionaires and large corporations," Sanders said.

Meanwhile, Clinton provided a more direct response, saying she would end the emergency management operations of the school system in Detroit – a big union priority – and create an "education SWAT team" within the Department of Education that would help flailing school systems get back on their feet.

"I would use every legal means at my disposal to try to force the governor and the state to return the schools to the people of Detroit," she said. "When Detroit gets back their schools, they should have all the help they can get to be able to get teachers in the classroom, to be able to find spaces while schools are being repaired."

Clinton also said she plans to reinstate a federal program that provides funding to states and school districts to repair and modernize schools. Congress has historically been wary of doling out funds for such uses, believing infrastructure for school systems is a state and local responsibility.

In addition, Clinton said she'd task the Department of Education with finding a solution to the national teacher shortage, especially in difficult-to-serve areas like poor urban and rural districts.