The former Chief Executive of BP has opened up about his “double-life” in the closet while running the company, in a book discussing homophobia in business.

Crossbench peer Lord John Browne resigned from BP in 2007, after revelations connected to his sexual orientation.

He stepped down after it emerged that he had lied to the High Court about where he met a former lover who was planning to take details of their relationship to the press.

His new book, The Glass Closet, discusses the “James Bond-style” life he had to keep his sexuality a secret.

He told the Guardian: “I internalised that to mean being gay was basically wrong, because if you got caught it would be very dangerous.

“You had to blend in, be chameleon-like, so no one would notice your private life. But you could be noticed in your work life, so you sublimated a lot into that. People say minorities have to overachieve, and I guess I did.

“Eventually it became very much two lives, and it was quite exciting.

“If I thought [people] would ask any questions, I’d avoid the situation. This may sound bizarre, but it’s surprising how people behave.

“If you say nothing, often they say nothing, and nothing will happen. It’s a series of non-statements and people draw their own conclusions. But nothing is clear. Nothing is said.

“I would say to myself that it taught me skills that were useful in other parts of life… [but] this is probably quite a self-justification.”

Lord Browne was publicly outed in the press, after his former lover Jeff Chevalier went public with details of their relationship.

He said: “I think, now, that probably the time was coming when what I was doing, and who I was, was becoming unsustainable.

“I simply didn’t register what was going on. I couldn’t believe he’d sell our story, so I ignored him.

“I’d never experienced it. My level of naivety in this area must have been incredibly high.”

On his decision to resign, he said: “I knew I wanted to go. In my own mind I was very clear. There were the two things that were wrong: I lied on the court paper, and the circumstances were going to create a furore.

“I didn’t want to get into the situation where someone was saying, ‘When will he go? Resign, resign, resign’.

“I’m very pleased that I took the moment as a full stop. I was ready to change everything.”

Earlier this month, it was reported that none of the CEOs of America’s 1000 biggest companies are openly gay.

Apple CEO Tim Cook topped Out Magazine’s power list three years in a row between 2011 and 2013, despite not having come out publicly.