Apple has violated U.S. antitrust law by conspiring to fix ebook prices, a federal judge told the company in New York City on Wednesday.

The trial, which began in June, concluded to a degree after U.S. District Judge Denise Cote said in a Manhattan courtroom that the iPhone and iPad maker colluded with five others to raise prices of ebooks.

According to Cote, the backroom discussions and negotiations, in breach of federal law, resulted in some prices raised significantly to $12.99 or $14.99, when Amazon sold the same ebooks for $9.99.

The move by Apple et al was to push back on Amazon's dominant position in the ebook selling market, according to the U.S. Justice Department, which rose to dominance partly due to its low-priced Kindle e-reader and its head start on selling books and magazines through its online retail outlet.

Apple was accused of colluding with Hachette Book Group Inc, Macmillan, News Corp.'s HarperCollins, Pearson Plc., Penguin Group, and Simon & Schuster (which is owned by CBS Corp., the parent company of ZDNet), which all settled with the U.S. government.

But Apple said it would fight until the end, insisting that it had not done anything wrong.

"The plaintiffs have shown that the publisher defendants conspired with each other to eliminate retail price competition in order to raise ebook prices, and that Apple played a central role in facilitating and executing that conspiracy," said Cote in the 159-page decision.

"Without Apple's orchestration of this conspiracy, it would not have succeeded as it did," Cotes added.

Apple told ZDNet's sister site CNET in an emailed statement that it "did not conspire to fix ebook pricing," and the company will continue to fight against what it called "false accusations."

"When we introduced the iBookstore in 2010, we gave customers more choice, injecting much-needed innovation and competition into the market, breaking Amazon's monopolistic grip on the publishing industry. We've done nothing wrong and we will appeal the judge's decision," the statement said.

The Justice Department said in published remarks that the judge's decision is a "victory for millions of consumers who choose to read books electronically."

"Companies cannot ignore the antitrust laws when they believe it is in their economic self-interest to do so. This decision by the court is a critical step in undoing the harm caused by Apple's illegal actions," the statement said.