Liam Fox has resigned after being bombarded with a raft of allegations concerning his working relationship with his friend and self-styled advisor, Adam Werritty.

In a letter to David Cameron, Dr Fox, who is the subject of an inquiry over the allegations, said he had “mistakenly allowed” personal and professional responsibilities to be “blurred”.

In response, the prime minister said he was very sorry for DR Fox’s departure but “understood his reasons”.

Dr Fox apparently took it upon himself to quit.

It emerged this week that Werritty, a lobbyist, had met the defence secretary on 18 foreign trips despite having no official role, and had been handing out business cards suggesting he was an adviser to Dr Fox.

It also emerged recently that Dr Fox’s tycoon friends paid for Werrity to fly around the world with him, including a corporate intelligence company and a billionaire who lobbies for Israel.

Questions have been raised whether Werritty personally benefited from his frequent access to the defence secretary.

No. 10 sources said that the prime minister had been willing Dr Fox to stay in his job until the details of a report by Cabinet Secretary Sir Gus O’Donnell in his conduct was published early next week.

In his resignation letter, Dr Fox said he had “mistakenly allowed the distinction between my personal interest and my government activities to become blurred.

“The consequences of this have become clearer in recent days,” he added. “I am very sorry for this.

“I have also repeatedly said that the national interest must always come before personal interest.

“I now have to hold myself to my own standard. I have therefore decided, with great sadness, to resign from my post as secretary of state for defence.”

Responding to Dr Fox’s resignation, Mr Cameron said: “I understand your reasons for deciding to resign as Defence Secretary, although I am very sorry to see you go.

“We have worked closely for these last six years, and you have been a key member of my team throughout that time.

“You have done a superb job in the 17 months since the election, and as shadow defence secretary before that.

“You have overseen fundamental changes in the Ministry of Defence and in our Armed Forces, which will ensure that they are fully equipped to meet the challenges of the modern era.

Dr Fox apologised to MPs earlier this week but maintained that there was no wrongdoing in his dealings with Werritty.