Faced with his first post-lockout test, NBA Commissioner David Stern failed. He crumbled under pressure. With the chance to deliver a game-winner, Stern missed an uncontested layup.

Stern’s stunningly wrongheaded decision Thursday to reject the league-owned New Orleans Hornets’ legitimate plans to trade point guard Chris Paul to the Los Angeles Lakers was a self-inflicted black eye as the NBA formally readied to return to work. In one misguided, cowardly move, Stern succeeded in hurting the Hornets and angering players still smarting over major concessions they made to help end the five-month lockout. At least Stern appeased all those hard-line, small-market owners.

Now that’s leadership.

Stern missed an opportunity to accelerate the post-lockout healing process. Had he permitted the trade, Stern would have sent a strong message that there’s a limit on how much his office should do to foster competitive balance. Killing the reported three-team deal — in which all the clubs would have actually benefited — was an embarrassment.

Officially, Stern’s office offered some nonsensical explanation about “basketball reasons” for nixing an agreement in principle the Hornets reportedly reached with the Lakers and Houston Rockets. The three-team deal would have put superstars Paul and Kobe Bryant together in the Los Angeles back court.

In addition to Paul becoming a Laker, forward-center Pau Gasol would have landed with the Rockets. The Hornets would have wound up with three productive NBA players — guard Kevin Martin, forward Luis Scola and forward Lamar Odom — as well as backup guard Goran Dragic and a 2012 first-round draft pick.

But Stern’s real reason for striking the three-way trade had about as much to do with basketball as the Bowl Championship Series system does with fairly selecting teams for the top bowl games.

His decision to block the trade was all about reasserting the hard-liners’ power on the eve of training camp opening. It was petty and vindictive. The hard-liners wanted revenge for losing so many players to the big boys. Stern gave it to them.

Forget the collective bargaining minutia we heard throughout the lockout. Disregard most of the details that finally led to the NBA being back in business. The hard-liners had two primary goals: Turn back the clock on player salaries so they could stuff their pockets a tad more and limit player movement.

Fed up with being a feeder system for the high-profile teams in the top destinations, the hard-liners, mostly from small markets, were willing to shut down the league for a year or more in an attempt to overhaul the system that enabled LeBron James and Chris Bosh to join Dwyane Wade in Miami and Carmelo Anthony and Amare Stoudemire to become teammates in New York.

Although some of Stern’s bosses didn’t get everything they wanted in the new CBA, enough were at least confident they had reestablished exactly who’s running this league.

The players accepted a much smaller percentage of league revenue than they negotiated in the previous labor agreement. There’s also a significant financial incentive for elite players to re-sign with their current teams and a higher luxury tax penalty for clubs that exceed the salary cap.

So on the day owners and players ratified the 10-year agreement, which either side can end after six years, imagine the hard-liners’ anger upon learning the Lakers were on the verge of doing what they fought to prevent. To them, it was as if nothing had changed — which was simply unacceptable.

Whiny Cleveland Cavaliers owner Dan Gilbert, apparently still fuming over James’s departure from his franchise 17 months ago, reportedly urged Stern to veto the trade. In all likelihood, Gilbert wasn’t the only owner who lobbied against Paul getting what he wanted.

Surely, Stern heard them.

The NBA maintains there was no owner uprising. Stern acted on his own, based on those unspecified “basketball reasons.” Stern, however, was undoubtedly aware of the owners’ mood.

Player movement has been the hot-button issue since Wade, James and Bosh teamed up. Since then, Stern has counseled irate owners demanding change, assuring them he would make it all right in the next agreement.

And then on the day the deal was finalized, the rich were about to get richer. Stern decided he just couldn’t let it happen.

Obviously, the commissioner was in a tough spot. Also, I get the competitive balance thing — within reason. In this instance, sound judgment was lacking.

Paul can still become a free agent this summer. He’s eager to leave New Orleans, which is why management worked hard to get the best offer it could for him, and would have received a good package under the circumstances. That’s gone now.

Any prospective new owner of the Hornets faces losing Paul and getting nothing in return. That’s no way to attract potential bidders.

With the Paul precedent, other major-market teams should rightly wonder whether Stern would block their roster-building efforts to satisfy the Clevelands of the league. It also seems players have lost even more freedom than some initially feared.

This is the NBA the hard-liners wanted, and Stern is definitely doing their bidding. Too bad he doesn’t care about doing what’s right.