HP won a legal victory today in its ongoing case with Oracle over breach of contract complaints.

Santa Clara Superior Court Judge James Kleinberg ruled in favor of HP's claim that Oracle violated a contract between the two companies when it decided to discontinue support for HP's Itanium-based servers.

The ruling states that Oracle is required to continue software support for servers using Intel's Itanium processor so long as HP continues to sell servers using the chip.

Additionally, Oracle must port its products for use on Itanium-based servers at no charge to HP.

HP has a contract

The root of the case goes back to a 2010 settlement between the two firms concerning former HP chief executive Mark Hurd's transition to working at Oracle.

Hurd's departure from HP came following unproven harassment allegations, which HP feared would breed animosity between the two companies as he moved to Oracle.

"My concern was he knew our financials. He knew our dependence on Itanium. He knew lots and lots of things," HP board member and former HP enterprise chief Ann Livermore said earlier this week in court.

Oracle must port its products for use on Itanium-based servers at no charge to HP.

Judge Kleinberg's ruling today indicates that the 2010 settlement addressed those concerns, including a contract to continue support for Itanium-based servers.

It could cost Oracle billions

The case is not closed yet, as HP and Oracle now prepare for a second trial to determine whether Oracle should pay damages.

HP filed the suit seeking up to $4 billion in damages, which it claimed would be the loss of server sales through 2020 without Oracle support for the Itanium processor.

Oracle recently lost another major legal battle against Google over infringement of Java code in the Android OS.

Though a jury ruled that Google had infringed on Java APIs, a judge determined that the case had no merit since the APIs could not fall under copyright.