A federal judge on Thursday issued an injunction to block Redbox from selling digital download codes of Disney films.

The ruling was a win for Disney, which has been trying to block the kiosk rental company from selling the codes since December. Redbox began selling the codes last fall at a considerable discount compared to prices on Amazon or iTunes. The company obtained the codes by buying DVD combo packs, which include DVD and Blu-ray discs as well as download codes, and then splitting them up and selling them separately.

Disney argued that Redbox was engaging in copyright infringement by encouraging its customers to make an unauthorized copy of its films. Redbox countered that Disney lost control of the digital copy of the film once it sold the combo pack, and Redbox was free to re-sell it, just as it does with the physical discs.

Disney’s first attempt to shut down the service failed in February. Judge Dean Pregerson ruled that the warning on the combo packs, indicating that “codes are not for sale or transfer,” was not explicit enough to prohibit Redbox from reselling the codes. Disney then rewrote the language for the release of “Black Panther.” The new language is much more detailed, and asserts that Disney owns the digital copy and licenses it only to the buyer of the combo pack. Disney then filed a second request for an injunction.

Pregerson ruled Thursday that the new language is sufficient, and granted the injunction.

“Because Redbox did not obtain an ownership right to any digital content when it purchased Combo Packs, Disney has adequately shown that it is likely to succeed on its claim that Redbox encouraged Redbox customers to infringe Disney’s copyrights by redeeming Codes in violation of the license terms set forth on the redemption sites,” Pregerson wrote.

The injunction applies to any combo packs that use the language on the “Black Panther” DVDs.

Redbox has argued that Disney’s lawsuit is an attempt to shut down a low-cost competitor, and has sued over Disney’s efforts to prevent Redbox from buying DVD packs. In April, Redbox alleged that one of its employees had been threatened with jail time for trying to buy “Coco” DVDs at a big-box retailer.

Update: In a statement following the ruling, Redbox emphasized that it applies only to the revised “Black Panther” license terms, and not to the terms found on earlier DVD packs such as “Coco.” Redbox has avoided selling “Black Panther” download codes.

“Redbox remains free to sell codes for those prior titles. This morning’s ruling is limited to digital codes for certain titles, like Black Panther, that contain new disclosures, but were distributed after the 19 titles listed in Disney’s complaint,” the company said. “Redbox has never attempted to sell, and had no plans to sell, digital codes for Black Panther. Disney, therefore, has not been damaged by Redbox’s business practices, and the ruling compels no change in Redbox’s business practices… The court’s decision once again maintains Redbox’s stance as an advocate for the consumer. We look forward to finalizing our victories in court.”