Oracle named former Hewlett-Packard chief executive Mark Hurd as its new co-president today. That puts Hurd in a position to do some serious damage to HP, which is now his competitor.

The appointment isn’t unexpected, since Larry Ellison, chief executive of Oracle, came to Hurd’s defense last month after Hurd resigned from HP under pressure, after an investigation by the board into a sexual harassment matter turned up inaccurate expense reports. Ellison thought that was a poor excuse for forcing Hurd to resign, and he said so in an email to the New York Times at the time. He called it “the worst personnel decision since the idiots on the Apple board fired Steve Jobs many years ago.”

During the five years Hurd served as CEO, HP became the biggest technology company, surpassing IBM and growing revenues from $80 billion to $115 billion last year. The Wall Street Journal reported yesterday that Hurd was in talks to join Oracle, confirming a prediction by VentureBeat’s Owen Thomas.

“Mark did a brilliant job at HP, and I expect he’ll do even better at Oracle,” Ellison said in the statement. “There is no executive in the information technology world with more relevant experience than Mark.”

Oracle had to make room for Hurd. Charles Phillips, who serves as co-president alongside Safra Catz, has chosen to resign from Oracle. Of course, that gives HP a chance to strike back at Ellison. Phillips had some huge responsibilities at Oracle and might very well now be a candidate for HP’s vacant CEO job. Then again, Phillips had his own sex scandal last year. He admitted to having an affair after the woman in question put up a billboard in New York’s Times Square about their relationship.

HP and Oracle are close partners in business computing. But Oracle’s purchase of Sun Microsystems last year upset that relationship, putting them in direct competition as vendors of both hardware and software. Hurd will bring his experience running HP to the task of whipping Sun Microsystems into fighting form. Before he joined HP five years ago, Hurd was CEO of NCR.

Hurd’s downfall at HP came after Jodie Fisher, a former HP marketing contractor, complained of sexual harassment. HP’s board couldn’t substantiate the allegations and Hurd settled the matter out of court. But during the investigation, the board found that Hurd had violated HP’s code of conduct by failing to disclose the close personal relationship with Fisher and for filing expense reports that appeared to conceal the relationship. Hurd denied improprieties, and Fisher said they did not have a sexual relationship. But the whole matter created mistrust between Hurd and the board.

Catz will continue to oversee Oracle’s finance, legal and merger and acquisition operations, while Hurd will manage sales, marketing and software support. Ellison will be in charge of engineering.