No good deed goes unpunished, Rahm Emanuel.

The former White House chief of staff is the mayor of the Windy City, and he’s made some tough calls in public education — enduring a teacher strike and earning the enmity of the Chicago Teachers Union, because he’s closed 50 failing schools in his first term.

The upshot, as New York magazine quipped: “Chicagoans gave their famously foul-mouthed mayor something to curse about ...”

Emanuel failed to get over 50 percent in the primary election and has to face an April 7 runoff. He widely outspent the other candidates and was endorsed by the powers-that-be from his former boss Barack Obama on down.

But the teacher union backed Cook County Commissioner Jesus “Chuy” Garcia, who took just shy of 34 percent in the primary and earned a runoff spot.

It’s a measure of the institutional obstacles to school reform — challenges familiar here in Louisiana, where the urgency of improving educational performance for the state’s youngsters can’t be overstated.

The process of change is inevitably difficult, but the hard part is in the middle. That was the wisdom of Harvard professor and leadership guru Rosabeth Moss Kanter when she spoke in Louisiana two years ago. She told the MetroMorphosis summit in Baton Rouge that meaningful change is often welcomed in the beginning, when a proposal is all new and shiny, and of course at the end should an idea be successful.

It’s the middle part that is hard, she said, and that is the problem for today’s school reformers. In local elections for school boards in Jefferson and Lafayette parishes last year, business-backed reformers took losses, in part because the elections fell squarely in the hard middle of reform plans. Those disaffected by changes tended to unite against them.

Another sage of leadership, Niccollo Machiavelli, said it centuries ago: “There is nothing more difficult to take in hand, more perilous to conduct, or more uncertain in its success, than to take the lead in the introduction of a new order of things,” he wrote.

While there are many issues in a city election, Emanuel’s tough stand for better education outcomes was clearly a factor at the polls. In a runoff, he is likely to win comfortably, but the short-term impact on his politics will be seen as a setback for school reformers.

Emanuel, famously foul-mouthed as he is, might put it more pungently, but that the liberal teacher union would turn against Obama’s former aide is a striking element in the political dynamics of school reform.