In a letter to the Prime Minister, he said: “As you know, there is an ongoing complaints process concerning text messages I sent to a colleague. I am complying with this process and have apologised to the recipient for those messages.
Since then there have been other allegations made about my past conduct. I refute the characterisations of these claims but I recognise these are becoming a distraction for the good work this government is doing for the British people.”
He added: “It is with real sadness I tender my resignation, but I want to take this opportunity to offer my full and total support from the back benches.”
It has been alleged that the former minister told a senior civil servant to “slit your throat”.
He made the remarks in front of colleagues during a meeting when he was Defence Secretary, according to a report in the Guardian.
On another occasion told the civil servant to “jump out of the window”.
Sir Gavin, the former Cabinet Office minister, has denied the allegations.