Only weeks after being ousted from Hewlett-Packard (NYSE:HPQ) because of an ethics scandal, software company Oracle announced it had hired former H-P CEO Mark Hurd as the firm’s new co-president.

The announcement was complicated by a lawsuit filed against Hurd by his former employer, who alleged a confidentiality provision in Hurd's contract banned him from working at Oracle.

The suit, originally reported in The Wall Street Journal, was filed in California Superior Court of Santa Clara County. According to the Journal, HP alleges that Hurd's severance package had a 24-month confidentiality clause to protect HP's trade secrets. By going to Oracle which competes with HP in products like data centers and software, Hurd is allegedly violating that agreement.

"HP is informed and believes ... Hurd has put HP’s most valuable trade secrets and confidential information in peril," HP said in its lawsuit.

If Oracle is successful, Hurd would be replacing outgoing Oracle (NASDAQ:ORCL) President Charles Phillips, who had reportedly expressed to Oracle CEO Larry Ellison his desire to exit the company months ago.

Hurd was CEO of H-P from 2005 until last month and was widely credited by investors and analysts for turning the company around. H-P’s annual revenues tripled under Hurd’s watch.

However Hurd was forced out after a sexual harassment investigation led to the company discovering Hurd had filed inaccurate expense reports.

Ellison had been very public about his disagreement with H-P to let Hurd go, calling it “the worst personnel decision since the idiots on the Apple (NASDAQ:AAPL) board fired [then CEO] Steve Jobs many years ago" in an open letter he wrote to H-P’s board of directors.

“Mark did a brilliant job at H-P and I expect he'll do even better at Oracle," said Ellison said in a statement announcing Hurd’s hiring. "There is no executive in the IT world with more relevant experience than Mark. Oracle's future is engineering complete and integrated hardware and software systems for the enterprise.”

Hurd’s expertise in the growing business of data center and enterprise computing could suit Oracle well, especially since the company purchased Sun Microsystems for $7.4 billion earlier this year. It would also place Oracle in direct competition with HP, a move that HP believes makes Hurd ineligible to work for Oracle.

Hurd would hold the president job in tandem with Safra Catz, who oversees Oracle’s finance and operations divisions.

Shares of Oracle jumped 7.5% on the news to $24.66 on Tuesday.