The new Foreign Secretary, Boris Johnson, has been accused of putting lives in danger after he published an article suggesting a former colleague was a spy "for a laugh".

While editor of The Spectator in 2001, Mr Johnson released an article naming a secret service agent using the pseudonym “Smallbrow” as the Daily Mail journalist, Dominic Lawson.

The article was based on allegations made in a book by a former spy, Richard Tomlinson. Mr Tomlinson claimed Mr Lawson, who was then editor of the SundayTelegraph, used to provide cover for British secret agents.

Mr Johnson published the claim Mr Lawson used to give letters to spies so they could pretend to be foreign correspondents on assignment.

Mr Lawson, who said he has never worked for the Secret Service, responded to the allegations by telling Mr Johnson's biographer, Sonia Purnell, how he had put the lives of his staff in jeopardy.

"He knew me, we were friendly. It was intensely annoying,” Mr Lawson said.

“And apart from anything else, if you're running a newspaper with foreign correspondents in strange parts of the world, as I was then, it's potentially a physical threat to them if it's believed that they're working for British intelligence.

“You can imagine how angry I was.

Theresa May questioned over Boris Johnson appointment by German press

"I rang him up, but there was just this sense of ‘Never mind, Dommers, I just did it for a laugh’," Mr Lawson said.

He added: “And the thing about Boris is that because in some strange way he is adorable, one forgives him. It's not just women; men too fall for that charm."

The revelations have surfaced following a conference on the ongoing war in Syria, in which Mr Johnson accidentally referred to Turkey as Egypt on two occasions.

Boris Johnson takes down boy during rugby match Show all 7 1 /7 Boris Johnson takes down boy during rugby match Boris Johnson takes down boy during rugby match Boris Johnson plays rugby with Japanese elementary school children in Tokyo Getty Boris Johnson takes down boy during rugby match Boris Johnson bumps into a schoolchild during a Street Rugby event at Tokyo Square Gardens building EPA Boris Johnson takes down boy during rugby match Boris Johnson collides with 10-year-old Toki Sekiguchi during a game of Street Rugby with a group of Tokyo children Reuters Boris Johnson takes down boy during rugby match Boris Johnson falls down after colliding with 10-year-old Toki Sekiguchi during a game of Street Rugby with a group of Tokyo children Reuters Boris Johnson takes down boy during rugby match Boris Johnson falls down after colliding with 10-year-old Toki Sekiguchi during a game of Street Rugby with a group of Tokyo children Reuters Boris Johnson takes down boy during rugby match Boris Johnson takes down boy during rugby match

There have been claims that the Foreign Secretary will no longer oversee MI6 following Mr Johnson’s appointment.

Writing in the Sunday Times, Adam Boulton said the Foreign and Commonwealth office is now left “with an unspecified role as it reels at the appointment of Boris Johnson as Foreign Secretary.”