Oil major BP said Chief Executive John Browne had resigned with immediate effect after UK courts lifted an injunction preventing a newspaper group from publishing details about his private life.
Browne will be succeeded by his designated successor Tony Hayward, the company said in a statement on Tuesday.
"In my 41 years with BP I have kept my private life separate from my business life," Browne said in the statement.
"I have always regarded my sexuality as a personal matter, to be kept private. It is a matter of deep disappointment that a newspaper group has now decided that allegations about my personal life should be made public," he added.
Browne said he had had a four-year relationship with Canadian citizen Jeff Chevalier who had told his story to Associated Newspapers, publishers of the Daily Mail, Mail on Sunday and Evening Standard.
Browne, who had been due to step down in July, said he had decided to leave now to "avoid unnecessary embarrassment and distraction to the company". One analyst, who declined to be named, said: "It is an ignominious end to a glorious career".
Browne did acknowledge in a personal statement that he had lied in his initial witness statement about how he met Chevalier. While he had quickly retracted this "untruth", a BP source said it was this that made Browne feel compelled to resign.
Justice David Eady told the High Court he had taken into consideration Browne's admission he had lied for his decision after a legal battle that had lasted four months in private. "I am not prepared to make allowances for a 'white lie' told to the court in circumstances such as these," Eady said.
Review of Evidence
Browne said allegations in court documents disclosed on Tuesday were "full of misleading and erroneous claims." "In particular, I deny categorically any allegations of improper conduct
relating to BP," Browne added.
BP Chairman Peter Sutherland said Browne had told the company of allegations over the limited use by Chevalier of BP computer and staff resources.
"At John's explicit request, the board instigated a review of the evidence. That review concluded that the allegations of misuse of company assets and resources were unfounded or insubstantive," Sutherland added in the statement.
Browne will also be hit financially as a result of his early resignation. As well as losing his agreed entitlement to a year's notice including a bonus of up to 1.3 times his annual salary, worth more than 3.5 million pounds ($7 million), he also foregoes inclusion in a long-term performance share plan with a maximum potential value of some 12 million pounds.
Browne is also expected to leave the board of U.S. investment bank Goldman Sachs Group, where he has been a director since 1999, a source familiar with the matter said on Tuesday.
Goldman Sachs declined to comment. Shares in BP closed 0.4% lower at 563 pence.