Companies now will have to be careful how they congratulate the achievements of athletes with whom they don't have endorsement deals.

On Wednesday, the 7th Circuit Court of Appeals in Illinois ruled that Jewel Food Stores did not have the right to publicly congratulate Michael Jordan on his Hall of Fame induction in an ad featuring its logo and the supermarket's motto.

By suing, Michael Jordan (with wife Yvette in 2013) is attempting to protect his own commercial value. Isaac Brekken/Getty Images

The former basketball star sued the supermarket chain, seeking $5 million in damages, after its ad appeared in a commemorative Sports Illustrated issue that hit newsstands in October 2009. Amid the text saluting Jordan, the ad had Jordan's familiar No. 23 on a pair of white and red shoes.

Jewel had successfully argued in district court that its ad was protected by the First Amendment because it was not commercial in nature, as in there was nothing specific the supermarket was selling. But the Court of Appeals opinion differed, saying Jewel was using Jordan to boost its brand, and it was therefore a commercial pitch to potential customers.

"The ad's commercial nature is readily apparent," the court's decision read. "It may be generic and implicit, but it is nonetheless clear. The ad is a form of image advertising aimed at promoting goodwill for the Jewel-Osco brand by exploiting public affection for Jordan at an auspicious moment in his career."

The decision cited ads by Olympic sponsors featuring Olympians who are often seen promoting a parent brand but not a particular product as evidence of the same type of commercial speech Jewel used in its Jordan ad.

Although the case will go back to the district court that originally ruled against Jordan, his lead counsel, Fred Sperling of Chicago-based firm Schiff Hardin, told ESPN.com that he was pleased the Court of Appeals ruled that Jewel's ad misappropriated Jordan's identity.

The Court of Appeals' decision could be precedent-setting in that it could further protect athletes from companies that try to loosely associate with them without paying them.

Jordan isn't seeking to profit from the missteps as much as he is hoping to protect his value. His lawyers have said their client's fair market value on any deal is at least $5 million. His current endorsement deals include Nike's Jordan brand, which bears his name, Gatorade and Hanes.

A second ad in the same commemorative Sports Illustrated issue has landed Jewel's competitor, Dominick's, in court with Jordan, as well. That dispute was more clear-cut because there was no debate that Dominick's was selling a product, as its ad offered $2 off a rancher's reserve steak from the grocery chain. Because settlement talks have failed, that case is expected to go to trial later this year.