The NBA has been subjected to arguably the most embarrassing episode in the 68-year history of the league — worse than a referee admitting he bet on games, worse than a player climbing into the stands to attack a fan, worse than even anything Dennis Rodman did, or said, or wore (post-Madonna era).

What makes the Donald Sterling Racist Rant Episode worse than any other blemish is that this one could have been avoided.

It didn’t matter that Sterling has been the subject of a blur of racial- and sex-discrimination lawsuits in the past. It didn’t matter that he settled ones of those suits by the Justice Department for $2.73 million. Instead, it took Sterling’s girlfriend, 50 years the junior of the 80-year-old Sterling, and an audio tape of Sterling’s hateful rants on a private conversation for the NBA to act.

When NBA Commissioner Adam Silver was asked Tuesday why the league did nothing about Sterling’s past indiscretions, he appeared to channel Captain Louis Renault from “Casablanca.”

“I’m shocked! Shocked to hear there was a racist among us!”

This isn’t to suggest this is mostly Silver’s fault. Actually, he’s probably the least to blame because he wasn’t in a position of authority until February.

Sterling was enabled for years, and there is ample blame to go around, beginning with the conspicuously silent former NBA commissioner, David Stern, who’s probably somewhere on a beach near a blender right now, wondering if maybe he should’ve done something about Sterling decades ago. Or maybe he doesn’t care. He certainly didn’t seem to before.

Silver did the best he could and the most he could, even if it was too late to avoid a pie to the face. He banned Sterling, the Los Angeles Clippers’ owner, for life and fined him the maximum $2.5 million, after confirming it was his voice on a recorded conversation with girlfriend V. Stiviano. Sterling scolded her for posting pictures on Instagram with African-Americans, including Magic Johnson. Sterling told Stiviano not to have her picture taken with African-Americans, nor to take any to Clippers games, However, Sterling said she was free to sleep with African-Americans. (Ours is not to reason why.)

Anti-black, anti-Hispanic rants are going to be a problem for anybody in society, let alone an 80-year-old white owner of a sports franchise in Los Angeles, in a league where 76 percent of the players are black, 81 percent are of color and more than one-third of league staff positions are filled by people of color. Also, Clippers coach Doc Rivers is black.

The problem with Silver’s delivery Tuesday was it came filled with “CYA” moments.

The NBA is the most diverse of all the professional sports leagues. Yet, Sterling has been the sports executive face of discrimination. He has been sued several times and painted as a slumlord billionaire. He spent $2.73 million to settle a 2006 housing discrimination lawsuit brought by the Justice Department. Sterling’s sworn testimony in the suit included, “Hispanics smoke, drink and just hang around the building” and “black tenants smell and attract vermin.”

The NBA did nothing. It didn’t suspend him. It didn’t investigate him. Sterling never was held accountable for his actions.

Silver’s out: Sterling never was found guilty of anything. Even in the Justice Department settlement, he wrote a check but admitted nothing. The NBA took this as innocence.

“There’s nothing I’ve seen in his behavior to support these views (on the audio recordings),” Silver said.

His nose just grew.

“I cannot speak for past reactions (by the league),” he responded to another question. “When the NBA was presented with specific evidence, it acted.”

Regarding the NBA coming down on Sterling for a secretly recorded conversation, Silver said, “Whether or not the comments were private, they’re now public, and those are his views.”

So let’s follow this: The NBA didn’t consider Sterling’s sworn testimony in the housing discrimination suit a serious matter. But his private conversation was so heinous that he needed to be banned from the league and forced to sell the franchise. Gotcha.

The truth is that the NBA enabled Sterling for too long and eventually paid a price.

But others also are at fault:

Owners: If they indeed hold the power to vote Sterling out, nobody gave it a thought before. Why? Maybe two reasons: 1.) Publicly attacking a relative partner is bad for business; 2) The Clippers have been a miserable franchise for most of their existence. Why push Sterling out?

Players: It's understandable why players of all races have condemned Sterling. So why are they playing for him? There has never been any kind of uprising by the union or agents against Sterling. Everybody has been willing to take his money and act like everything was fine.

NAACP: Sterling was set to receive a lifetime-achievement humanitarian award in May. That's off now. Sterling has been a major contributor to the Los Angeles chapter, but the organization denies that was a factor in the original intent to honor him. In the L.A. Times, activist Earl Ofari Hutchinson said the NAACP "airbrushed" Sterling's offenses and contends he "has been a gem in giving oodles of tickets away to needy inner-city kids and ladling out some cash to charities."

Media: Stories have been reported, but there never was significant pressure put on Sterling or the league. It helped that in L.A., the Clippers are dwarfed by the Lakers for attention.

If not for a jilted girlfriend, Sterling still would be sitting in his courtside seat. A tape recorder and TMZ can be powerful tools in this era. Apparently more powerful than any other evidence.