Stay on Top of Emerging Technology Trends Get updates impacting your industry from our GigaOm Research Community

After weeks of back-and-forth between the Department of Justice and Apple (s AAPL), the federal judge overseeing the ebooks antitrust case issued an injunction against Apple in a filing released Friday. The Department of Justice will be happy, because the final injunction contains a lot of what it had asked for.

In July, Judge Denise Cote found Apple liable of conspiring with publishers to set ebook prices at the launch of the iBookstore.

“Apple did not conspire to fix ebook pricing,” company spokesman Tom Neumayr said in a statement. “The iBookstore gave customers more choice and injected much needed innovation and competition into the market. Apple will pursue an appeal of the injunction.”

The injunction, which is set to go into place in 30 days, will last for five years — but the court can extend it for “one or more one-year periods” after that, either on its own or at the request of the DOJ or the states. Apple may seek a stay of the injunction pending its appeal.

The DOJ cheered the decision: “The court’s ruling reinforces the victory the department has won for consumers,” DOJ antitrust assistant attorney Bill Baer said.

No MFNs with any publisher

Judge Cote’s injunction forbids Apple from enforcing most-favored-nation clauses in any ebook publishing contracts for five years, and also forbids the company from entering into any book publishing contracts that contain them for five years. Apple had wanted this provision to be less broad, relating only to MFN clauses with the five publishers in the case who have already settled. Instead, it applies to all publishers.

Sorry, DOJ: You can’t mess with the way Apple sells App Store content

The DOJ had wanted to change Apple’s in-app purchase policies, and had wanted to force Apple to allow competing ebook retailers — like Amazon (s AMZN) — to sell ebooks through their apps without taking its customary 30 percent commission. Luckily for Apple, none of that is included in the final injunction. (Judge Cote had already indicated that she wouldn’t try to regulate the App Store.)

Ebook discounts for a long time

As expected, Judge Cote will require Apple to stagger new contract negotiations with the settling publishers — HarperCollins, Hachette, Simon & Schuster, Penguin and Macmillan. As part of their original settlements, all of those publishers were required to enter new contracts with retailers that allowed the retailers to discount their books for two years. While those agreements are already under way, the clause in the injunction will significantly extend the amount of time that they’re required to allow discounting of their books (not just in the iBookstore but, in effect, with all other retailers).

Apple had already agreed to this, but had wanted to choose the order in which it would negotiate new contracts with the publishers. Nope, says Judge Cote, it has to be in this order (with Penguin and Macmillan, the last publishers to settle, getting punished by having to wait the longest to renegotiate contracts)

An external monitor for Apple

For two years, Apple will be monitored by a court-appointed External Compliance Monitor to ensure that it complies with the terms of the order. Apple can suggest candidates for the position.

Here’s the injunction:

[scribd id=166019353 key=key-2ad6ky0w2a4c96c9wtcb mode=scroll]