It was time to leave the building.

At 5 p.m. on May 1, 2007, a few hours after resigning as chief executive of BP, I stepped into the elevator on the fifth floor of the London headquarters and began my descent. When the doors opened, I had two options. I could make my way to an underground garage without being noticed and escape by car. Or I could walk out the main entrance, where about 30 press photographers had spent the day waiting.

My overwhelming desire to conceal my sexual orientation over the course of four decades in the oil industry had culminated in this terrible juncture. My long-kept secret was about to be exposed, and I was not going to hide any longer. I decided to leave through the front door.

At around 10 that morning, reporting restrictions under a High Court injunction issued four months earlier had been lifted. Associated Newspapers (publisher of the Daily Mail, the Mail on Sunday and the Evening Standard) would now be able to disclose details of my three-year relationship with a young Canadian named Jeff Chevalier. In 2003, I had met Jeff, a 23-year-old male escort, on a now-defunct website. As a businessman in the public eye, I was too frightened to go out to a club or find a date because of the risk of being discovered. After nine months, Jeff moved in with me, but our relationship eventually fell apart.

On Jan. 5, 2007, I was on vacation when the Mail on Sunday telephoned the BP press office. They said they intended to publish a story including details about my private life with Jeff. I quickly decided to hire a top London law firm and to seek an injunction to block publication of the story.