Lord Browne, chief executive of BP, has resigned with immediate effect hours after it emerged that he had lied to the High Court about a four-year gay relationship.

BP, which said it accepted Lord Browne’s resignation with the “deepest regret”, said the chief executive would lose his entitlement to a leaving package worth £3.5 million and a potential £12 million in shares.

A judge found he had lied about the circumstances in which he had met his former partner, Jeff Chevalier, a Canadian.

Mr Justice Eady said the lie which to which Lord Browne admitted, after he had persisted in it for about two weeks, “was to the effect that he had originally met Mr Chevalier by chance, while exercising in Battersea Park”. Although this claim may be reported, the true circumstances in which the two men met are not included in the published judgments.

Mr Justice Eady suggested that the distinction between the two accounts of how the men met might be “of little materiality to the primary issues in the case”. But what mattered, the judge explained, was that Lord Browne “clearly thought it important at that time and quite deliberately, and casually, chose to lie to the court about it”.

Lord Browne said in his resignation statement: “My initial witness statements, however, contained an untruthful account about how I first met Jeff.

“This account, prompted by my embarrassment and shock at the revelations, is a matter of deep regret. It was retracted and corrected. I have apologised unreservedly, and do so again today.”

He added: "For the past 41 years of my career at BP I have kept my private life separate from my business life. I have always regarded my sexuality as a personal matter, to be kept private.

"I shall not be commenting on my personal issues further. I wish to pursue my personal life in private."

The businessman had originally asked the High Court to prevent the publishers of the Mail on Sunday from reporting details of his relationship with Mr Chevalier, arguing that he had a reasonable expectation of privacy.

Lord Browne also wanted to stop Mr Chevalier talking to the press about dinners he had had with leading Government figures including the Prime Minister and Peter Mandelson.

Listing the allegations, the judge said: “There was a dinner with the claimant [Lord Browne] and Tony Blair which a woman called Ms Hunter had organised on 8 June 2005 and at that dinner Tony Blair discussed life after government and aspects of his own character.

“There was another dinner with the claimant, Mr Chevalier, Ms Hunter, Peter Mandelson and the latter’s Brazilian boyfriend at the time - referred to as 'Reinaldo’- which was held at one of the claimant’s homes, and at which they discussed European Union policy and Chinese textile quotas.”

These conversations, said the judge, were entitled to protection. People were entitled to speak freely on social occasions, within reason, without having their conversations “regurgitated in the press”.

Another allegation that Lord Browne sought to prevent being published was that he had “bought a flat in Venice several years ago and used the same agent to buy it as had Mr and Mrs David Beckham. Builders who had conducted renovation works presented him with two bills, one of which did not include VAT. The claimant allegedly paid cash for that bill and 'dodged’ his tax bill (strongly denied by him).”

Other items Lord Browne wanted covered by the injunction were business plans involving BP, his relationship with colleagues at the company and discussions about business ideas with Gordon Brown, the Chancellor.

Mr Justice Eady held that most of these matters would be protected by the developing law of privacy, but the judge said that Lord Browne’s lie was not a reason for refusing the injunction.

In March, Lord Browne took his case to the Court of Appeal. Three judges concluded that Mr Justice Eady was right in holding that the newspaper could publish some, though not all, of Mr Chevalier’s allegations.

Lord Browne took his legal battle all the way to the House of Lords, which announced today that it was refusing him permission to appeal.

Three judges said the newspaper could report the alleged misuse of BP’s resources and manpower to help Mr Chevalier.

This included his “personal use, with the claimant’s knowledge and permission, of BP’s computers, and of its support staff; the involvement of BP personnel in setting up and eventually winding up a company created by the claimant for [Mr Chevalier] to run”; and “the use of a senior BP employee to run a personal errand for the claimant by delivering cash” to Mr Chevalier.

The Court of Appeal permitted the Mail on Sunday to publish the “bare” fact of Lord Browne’s relationship.

The newspaper had said it helped authenticate the other allegations it wished to publish.

In the earlier judgment given in January, Mr Justice Eady said he was not prepared to make allowances for a “white lie” told to the court in circumstances such as these, especially by a man who told the court of his reputation and distinction “and refers to the various honours he has received under the present Government”.

The judge said it was not only Lord Browne’s “willingness to tell a deliberate lie to the court, persisted in for about two weeks, that is relevant in assessing his own credibility and the overall merits. So too is his willingness casually to 'trash’ the reputation of Mr Chevalier and to discredit him in the eyes of the court”.

Lawyers for Associated Newspapers, publishers of the Mail on Sunday, argued that the court should refuse to grant Lord Browne the injunction he was seeking because he had “deliberately sought to mislead the court and thereby committed a criminal contempt of court or, perhaps, attempted to pervert the course of justice”.

Mr Justice Eady said: “I could refer the matter to the Attorney-General but I cannot think that anything would be achieved by doing so. In any event, it is probably sufficient penalty that the claimant’s behaviour has had to be mentioned in this judgment.”

The judge recounted how, between 2002 and 2006, Mr Chevalier adopted Lord Browne’s lifestyle and was provided by him with food, travel, clothes and accommodation at a fairly luxurious level.

In addition, Lord Browne also made substantial payments to him over the period in cash or by cheque. The judge said that their relationship became fairly widely known although no mention of it was made in the media.

It was significant that Mr Chevalier accompanied Lord Browne at various social events and on trips, including events connected with Lord Browne’s business activities.

Lord Browne took various steps to enable Mr Chevalier, whose visa was due to run out early on in the relationship, to remain in the country.

This included paying for a university course from 2003 so that he would acquire student status and helping him to set up a company to trade in mobile phone ring tones.

When the relationship ended, Mr Chevalier found himself in financial difficulties and having to adjust to a drastically reduced lifestyle. Mr Chevalier said Lord Browne provided him with funds towards a 12-month lease on a Toronto flat and furnishings.

He also claimed that Lord Browne agreed “that if needed, [he] would assist in the first year of me transitioning from living in multimillion-pound homes around the world, flying in private jets, five-star hotels, £2,000 suits, and so on to a less than modest life in Canada.”

He said his plight was compounded by the fact that he had left his career path in the IT field when he was effectively being “kept” by Lord Browne.

The judge said Mr Chevalier sought further financial assistance towards the end of last year, saying that he was facing hunger and homelessness. He asked for some assistance backed by what the judge said could be interpreted - although Mr Chevalier denied it - as a “thinly-veiled threat”.

“It then appears that Mr Chevalier, shortly afterwards, decided to go to the press and 'spill the beans’ in various ways.”

The judge said it was ironic that Lord Browne should choose to tell a lie at a time when he was challenging evidence given by Mr Chevalier.

“It was said that he is a liar, unstable and adversely affected by dependence on alcohol and illegal drugs.”

But Mr Chevalier’s medical records “contained virtually no support for the allegation of significant alcohol and drug dependence at the material time - although Mr Chevalier admitted some drug abuse at an earlier period in his life. The records rather revealed that he was being treated for anxiety and panic attacks.”

The judge said Lord Browne’s “allegation about alcohol seems largely to have been based on an inference he drew when his butler told him that his wine stocks were diminishing”.