The decision overturns a previous finding by Sweden's Competition Authority that such a ban was illegal.
"I can say we're very relieved about the court's decision, which we feel confirms our competition rules," hockey league chairman Anders Hedin told newspaper Expressen on Tuesday.
Of the 12 teams in Sweden's top division only two - Frolunda and Modo - signed short-term contracts with players locked out due to a dispute between players and clubs in North America's National Hockey League.
Hedin said it was too early to say whether the two clubs would be punished.
- Sports & Recreation
- Ice Hockey