Gary Williams rescued Maryland’s basketball program from NCAA probation, pushed it to the top and remains second to none as a game coach.

In recent years, though, Williams also has fallen short of the high competitive standards he set, while refusing to revise his outdated recruiting philosophies.

In the process, Williams has become such a polarizing figure, most Terrapin fans probably agree with only one-half of the above.

But the Maryland coach is all of this. He is a hero who resuscitated his alma mater after Bob Wade’s brief and disastrous tenure resulted in crippling NCAA sanctions during the early 1990s. But he’s also a black-and-white coach in the increasingly gray world of recruiting, and Williams’s unwillingness to keep pace with the times has played the biggest role in Maryland’s gradual slide to mediocrity.

In the ACC tournament that begins Thursday in Greensboro, N.C., the Terrapins will attempt to make a historic four-game run to win the championship and receive the conference’s automatic NCAA tournament berth. No team has won four straight games in the ACC’s current format, and Maryland likely will miss the NCAA tournament for the fourth time in seven seasons.

The Terrapins (18-13, 7-9) went 2-5 in their last seven games and closed with three consecutive defeats, including a 14-point loss to Virginia in the regular season finale at Comcast Center. Maryland struggled, in large part, because of the inconsistency of seniors Dino Gregory, Adrian Bowie and Cliff Tucker. When you don’t recruit one-and-done NBA players, a senior class must deliver.

The Terrapins are no longer nationally relevant.

Maryland has not been in the Final Four since Williams led it to consecutive appearances — the only two in school history — and the national title in the 2001-02 season. More significantly, the Terrapins haven’t reached the Sweet 16 since the 2002-03 season, and have finished .500 or worse in ACC play six times in the past eight seasons.

Still, Williams is an outstanding floor coach and teacher in practice, which I learned while covering college basketball for the Los Angeles Times earlier in my career. Other coaches often praise Williams for being a coach’s coach, and he hasn’t lost his touch.

The Terrapins also have outstanding facilities and are well-positioned geographically in one of the best regions for Division I hoops prospects.

So Maryland’s drop-off just doesn’t make sense, not with a championship-winning coach, first-class facilities and access to a deep talent pool.

“I do it a little differently,” Williams said in a phone interview Tuesday. “I don’t cheat.”

That’s another thing coaches tell you about Williams: He follows the rules. In recruiting, Williams interacts only with those who share his clear-cut, right-and-wrong views on team building.

“The rules are in place, and you try to play by the rules,” Williams said. “That’s what I’ve always done. I respect the game. I respect this school.”

I respect Williams for his highly principled approach to an increasingly unprincipled profession.

Having investigated college basketball recruiting, I know exactly the type of people Williams has chosen to avoid, and I understand his reasoning.

But it’s not that simple. There are certain realities in big-time college basketball, facts that high-profile coaches must accept if they hope to maintain what they’ve built.

Surely Williams can’t believe that all the teams that have enjoyed success while Maryland has struggled are bankrolling their rosters to do so.

This is the main hot-button topic for Williams’s detractors and supporters. The vitriol on both sides makes it nearly impossible to initiate meaningful dialogue about the state of the Terrapins. Williams’s defensiveness contributes to the shouting.

In fairness to Williams, the Terrapins are only one season removed from sharing the regular season ACC championship with Duke, and he was selected the conference’s coach of the year for the second time. Entering this season, the Terrapins’ 120 ACC victories over the previous 12 seasons were second only to Duke’s 151.

Then there’s the talent argument. For every Kevin Durant, Rudy Gay and Michael Beasley who left the region to play college ball, Williams instead points to the program’s success in helping under-the-radar players develop into stars. Greivis Vasquez was the conference’s top player last season, and sophomore center Jordan Williams was selected to the all-ACC first-team this week.

Freshman guard Terrell Stoglin was voted to the all-freshman team, and Jordan Williams was on it last season. Maryland and Wake Forest are the only schools with all-freshman players in each of the last two seasons.

The fact is, though, Williams has not attracted players who possess NBA star potential. Such a player can take an average supporting cast deep into the NCAA tournament. A team with two or more has a good chance to cut down nets.

No one could blame Williams, 66, if he doesn’t want to spend his summers watching high schoolers 12 hours a day at shoe company-sponsored tournaments. However, that’s now part of the gig for college coaches making seven-figure salaries.

Despite the program’s downward trend, Williams has compiled a Hall of Fame resume, and the right boosters are still believed to be in his corner. He also appears to have developed a good relationship with Kevin Anderson, Maryland’s new athletic director, and Williams deserves to leave on his terms for everything he has done for the school.

“I’m here as long as I can stay healthy and feel like I can do the job,” he said.

And as long as Williams remains on the job, Maryland basketball probably will continue adhering to the rules and winning games. Just not nearly as many games as most of its fans would prefer.