When the word “cartel” gets thrown around, people usually conjure up images of South American drug lords smuggling cocaine and brandishing semi-automatic weapons. Not many people think about eBooks.

Apple is in court today defending itself in an antitrust case brought up by the Department of Justice. The company is accused of conspiring with five publishers to take a larger chunk of Amazon’s market share and increase the profit margins of eBook sales.

Philip Elmer-DeWitt of Fortune explained the delicious irony of this case: Apple is trying to position itself as “the little guy” just trying to make a buck against the massive corporation of Amazon, so it formed a cartel to drive up the price of eBooks.

The DOJ alleges that Apple, along with Hachette, HarperCollins, Macmillan, Penguin and Simon & Schuster, increased the price of eBooks by uprooting the wholesale model that had set the price of eBooks at $9.99.

With the wholesale model, publishers sell books to retailers who set the price for the general public. In the case of Amazon, most eBooks were set at $9.99. In the same way that $.99 or $1.29 has become the industry standard for song downloads (largely thanks to iTunes) $9.99 had become the consumer expectation for eBooks because of Amazon.

Apple wanted to increase the industry standard of eBooks to make it worth their time and effort to invest in them. Their profit margin wasn’t big enough at only $9.99. Together with the five publishers, Apple is accused of forcing the agency model, where the price is set by the publishers instead of the retailer.

The agency model takes the power out of Amazon’s hands for pricing and puts it into the hands of publishers. The five publishing houses that Apple is accused of conspiring with set eBook prices as high as they wanted and retailers like Apple and Amazon had to accept them. Apple got 30% of every eBook sold through its store. With the agency model, Apple just competes with Amazon for the better gadgets while taking in more money from increased eBook prices.

The case was brought by the DOJ because their plan did more than hurt Amazon. According to the report, it violated antitrust laws that are meant to set an even play field for retailers and cost consumers tens of millions of dollars more than they would have originally paid for eBooks.

Economists and lawyers alike are left scratching their heads wondering why a company that holds 90% of the eBook market (Amazon) is the victim in this case. How is it that the company that’s making the most off of eBooks right now is getting positioned as a small retailer being pushed out of the industry?

It doesn’t look good for Apple. According to the Telegraph, US District Judge Denise Cote who is overseeing this case already said that the government will prove that Apple created and implemented a plan to raise eBook prices. They’re entering the court room with the odds against them.