The Maryland Board of Regents had two months to do the right thing — and did the complete opposite.

College Park president Wallace Loh had four months to do the right thing — and only did so Wednesday, and even then only under mounting pressure from state politicians and the university community.

DJ Durkin is no longer the football coach at Maryland and that’s a step — one step — in right direction for an institution that has been well off course for some time.

Twenty-four hours after the regents reportedly told Loh to keep Durkin or they’d find a president who would, Loh fired him anyway, under backlash from everyone who saw clearly what the board amazingly couldn’t.

This all took place almost five months to the day after Jordan McNair collapsed in the heat during an offseason practice. Two weeks later, after he had failed to receive proper on-field treatment for heatstroke, he died.

ESPN and The Washington Post conducted investigations into Durkin’s program and found what was described as a toxic atmosphere. While much of it was brought about by the bullying and abusive behavior of strength coach Rick Court, all of it was sanctioned — and encouraged — by Durkin. Players learned quickly that complaining to Durkin about Court would not only do them no good, it would probably land them in trouble.

After the initial ESPN report in August, Maryland moved quickly to buy out Court and make him the public fall guy. Loh held a news conference announcing a commission that would look into the program and said bluntly that the school was “legally and morally” responsible for McNair’s death.

That was when things went from tragic to political and horribly wrong.

Board of Regents chairman James T. Brady, who had a long-simmering feud with Loh, dating from Loh supporting a student senate initiative to remove the name of former school president Harry C. (Curly) Byrd from the football stadium, began working to undermine Loh’s authority.

The day after Loh announced that he was appointing a commission to investigate Durkin, Brady and the regents moved to take over the investigation and named several new members to the commission — notably former Maryland Governor Robert Ehrlich, who had first appointed Brady to the board during his one term in office.

Loh’s mistake was appointing the commission in the first place. If he had enough evidence on Aug. 11 to claim the school’s responsibility for McNair’s death, he had all he needed at that moment to fire Durkin.

Durkin was in charge of the football program, and one of his duties was to keep his players as safe as he possibly could. He failed utterly, first by hiring Court and then on that awful Tuesday in May when McNair collapsed running sprints while coaches screamed profanities at him and two trainers failed to get him the ice treatments he needed to receive right away that would have saved his life.

That was all Loh needed to know about Durkin’s program. He didn’t need to have a commission spend almost 11 weeks interviewing players and families and coaches to produce a 192-page report that failed to make a recommendation regarding personnel.

All that time and all that money to confirm what everyone already knew while making sure to say that all of that didn’t add up to “toxic.”

Toxic is a subjective word.

The commission’s report confirmed almost everything ESPN and The Post had reported.

And yet, when the board finally got around to taking action, it got everything exactly wrong. It made a mistake in retaining Damon Evans as athletic director. Evans has tried to act as if he’d never heard of Maryland football before he was officially named athletic director in July — even though he had been charged with overseeing the football program throughout Durkin’s tenure. But the colossal error was attempting to convince people that Durkin should keep his job.

The backlash was almost instantaneous and it was virtually unanimous. There may have been a handful of Durkin supporters clinging to the, “This is the way it is in big-time football” excuse, but they were few and far between.

Three players simply stood up and walked out of Durkin’s first return meeting with his team. Students began organizing a rally protesting Durkin’s return to work. Alumni and boosters began sending emails to anyone in authority expressing disgust at what the regents had done to the school’s public image and to McNair’s memory. McNair’s father, Marty McNair, said he felt as if, “someone had punched me in the stomach and spit in my face,” when he heard the decision.

Finally, Maryland Gov. Larry Hogan (R) sent a note to the regents asking them to reconsider their decision. That, apparently, was the final straw. Loh told Evans to tell Durkin he was fired, although he euphemistically called it a “departure.”

In the end, amid all the preening by the so-called adults, it was a student, wide receiver Michael Cornwell, who was most eloquent. In a tweet, Cornwell quoted Martin Luther King Jr, saying: “True peace is not merely the absence of tension, it is the presence of justice.”

Durkin wasn’t fired by the regents or by Loh. He was fired by the outrage that rained down upon the regents for their coldhearted, stunningly tone-deaf initial decision.

Maryland is still several galaxies away from being sound again. But, to quote another great philosopher, Lao Tzu, the journey of a thousand miles begins with a single step.

Thursday was one step, nothing more. But at last, it was a step in the right direction.