David Stern died Wednesday at the age of 77, and the tributes will pour in for days, weeks, months and years. They will all be deserved. They will focus — correctly — on how he turned the NBA around at a time when the league was struggling, best described in the early 1980s by the great writer David Halberstam as “too black and too drugged in the eyes of the ticket-buying public.”

Halberstam made that comment in 1980, shortly after writing his brilliant book, “The Breaks of the Game,” and a few months after Magic Johnson’s remarkable 42-point performance in Game 6 of the NBA Finals had been televised on tape delay by CBS.

Yes, tape delay.

That’s where the NBA was at that moment. Stern was then the league’s executive vice president, the No. 2 man to Commissioner Larry O’Brien. In that role, Stern negotiated two changes that began the NBA’s turnaround: the advent of a salary cap and of drug testing. He became commissioner in 1984, guiding the league with a firm and unrelenting hand for the next 30 years, and the league began a renaissance that has seen few setbacks since then.

People will point out that Stern and the league were aided immeasurably by the arrival in 1979 of Johnson and Larry Bird, and then by Michael Jordan’s explosion as a player and as a corporate salesman after he turned pro five years later.

Stern would be the first to agree with the notion that Johnson, Bird and Jordan made his job a lot easier. But it’s my belief that Stern would have found a way to rebuild the league regardless — he was that smart and that good. His public persona was tough and uncompromising. And when it came to important matters — especially union negotiations — he was exactly that.

But the Stern I was fortunate enough to get to know wasn’t at all like that. He was someone who always tried to do the right thing, and he didn’t ask for any credit.

In 2006, after George Mason had made a miraculous run to the Final Four, the board of directors of the Children’s Charities Foundation wanted to take advantage of Mason’s new-found popularity and make the school a part of the BB&T Classic that December. There were already two games scheduled in what was then the Verizon Center involving Maryland and George Washington, who had been the tournament’s hosts since 1994. I was on the board, and we all knew if we could add a game involving Mason we would undoubtedly ensure a sellout, which would mean a couple hundred thousand extra dollars for the charity.

But we had a problem. Our games were on a Sunday, with the first game scheduled to tip off at noon. When the NBA released its schedule that summer, the Wizards were slated to play at 6 that night. I was the board’s contact with the basketball world, so I reached out to one of the NBA’s schedulers to see if the Wizards’ game could be moved either to later that night — 8:30 or 9 — or the next night. I was told that if Susan O’Malley, who was running the business end of the team at the time, would agree, the game could be moved.

O’Malley said no.

Having failed to get anything done through normal channels, I called a friend in the NBA office and said I had to speak to Stern. I was told he was in Russia and maybe I could talk to him when he came back the following week. Early the next morning, my phone rang. It was Stern.

“I can’t go to Russia for a few days without you creating a crisis?” was his opening comment.

“Are you in Russia?” I said groggily.

“Yes, and I have a meeting in about five minutes.”

“You know it’s about 5 a.m. here,” I said, glancing at the clock.

“Would you have preferred I call you back in a week? What’s the problem?”

I woke myself up and explained it to him.

“Let me see what I can do,” he said.

Two days later, the same person who had told me nothing could be done once O’Malley said no called back. The Wizards had moved their game to Monday night.

“What happened?” I asked.

“The commissioner happened,” he said. “He was furious that we didn’t get this done. He told me to call Susan and tell her we’d get her an extra national TV appearance if she moved the game. Amazingly, she was suddenly able to move the game.”

To say Stern saved the day for a charity that gave all its money to kids in need is an understatement. The third game was a huge financial boon. But there was a postscript. Several weeks later, a check arrived made out to the charity for $10,000. The check wasn’t from the NBA. It was from Stern. He asked that the charity not publicize his contribution.

Stern and I often emailed one another. He loved giving me a hard time about things I wrote. During the NHL lockout that wiped out the entire 2004-05 season, I wrote a column that was extremely critical of NHL Commissioner Gary Bettman — who had once been Stern’s deputy.

“You’re way off base criticizing Gary,” Stern wrote. “He’s doing the right thing. Typically liberal of you to side with the players.”

I pointed out in my response that few people on earth were more liberal than Stern. “Guilty,” he answered. “And I do mean guilty.”

Stern also lectured me at length for not showing more interest in the WNBA, calling me — I have it in writing, — “a sexist, old white man.” I told him he was an older white man and pointed out that I rarely showed much interest in the NBA, either.

“And we’re grateful for that,” he wrote back.

Years ago, when I was working on an NBA-related project, Larry Brown, then the Indiana Pacers coach, agreed to give me complete access to his team, much the way Bob Knight had at Indiana in the 1980s. When I checked with then-PR honcho Brian McIntyre to make sure the Pacers wouldn’t get in trouble with the league, he said he would check with Stern. The answer came back quickly: “David says if the Pacers are willing to put up with you, he’s fine with it.”

And finally this: I spent years, to no avail, trying to help Lefty Driesell get into the Naismith Memorial Basketball Hall of Fame. I could have written and talked about how unfair it was for the next 100 years, and it would have done no good. Two years ago, I sent an email to Stern with the subject line: “Not kidding, this is important.”

I explained that I thought it was a terrible injustice that Lefty wasn’t in the Hall and that the rumors that he had somehow acted improperly in the wake of Len Bias’s death were urban legend, completely false, and that NBA people on the selection committee had no clue about that. He wrote back and asked me to send him everything I knew about Lefty. I did.

“I’ll talk to Jerry,” he said, referring to Jerry Colangelo, the chairman of the Hall’s board of governors. “But do not mention to anyone that I’m doing this. I agree with you that Lefty should be in the Hall. I’ll see what I can do.”

Four months later, Lefty was finally voted into the Hall. I have no doubt it was Stern who was responsible. I feel no guilt telling the story now.

When Red Auerbach was still alive, he often told me that he liked Stern — even though he believed he was still a Knicks fan — “because he always takes my calls.”

Stern said he did always take Auerbach’s calls, “even though he seemed to think my full name was, “Let me tell you why you’re stupid David.”

Then Stern would add: “He was Red Auerbach. Of course I took his calls.”

Indeed. But he also always took my calls — and never failed to respond to an email. That was impressive, because I’m absolutely not Red Auerbach.

The NBA — thanks to Stern — is a colossus and will continue to be one under Adam Silver, Stern’s hand-picked successor.

But David Stern will be missed for reasons that go well beyond his genius. He was a great commissioner. He was a better man.