BEIJING — Michael Jordan has pulled out a victory in an arena long known as unfriendly to visitors: the Chinese legal system.

China’s highest court on Thursday ruled largely in favor of Mr. Jordan, the former basketball star, in a landmark decision that lays out the ground rules for protecting personal names in trademark cases.

The decision held that Mr. Jordan owns the legal rights to the Chinese characters of the equivalent of his name, overturning previous lower-court rulings. The trademark dispute drew attention for the precedent it could set for foreign companies and celebrities pursuing similar cases in China.

The four-year lawsuit pitted Mr. Jordan against Qiaodan Sports Company, which he has accused of building a brand around the Mandarin transliteration of his name. The verdict, from the Supreme People’s Court, reversed previous rulings by lower courts in Beijing that said Qiaodan, based in the southern province of Fujian, could use the Chinese characters for Jordan to sell their goods.