Metropolitan Police Commissioner Sir Paul Stephenson has resigned following the phone hacking scandal.
Britain's most senior police officer has faced criticism for hiring former News of the World executive Neil Wallis - who was questioned by police investigating hacking - as an adviser.
Sir Paul said his links to the journalist could hamper investigations.
He said there were lessons to be learned from the affair, but he was leaving with his integrity intact.
He also said he had no knowledge of the extent of the phone hacking.
Sir Paul said in a statement: "I have taken this decision as a consequence of the ongoing speculation and accusations relating to the Met's links with News International at a senior level and in particular in relation to Mr Neil Wallis."
'Great sadness'He added: "Let me state clearly, I and the people who know me know that my integrity is completely intact.
"I may wish we had done some things differently, but I will not lose sleep over my personal integrity."
The Mayor of London, Boris Johnson, said he accepted the resignation with "great sadness and reluctance" and he had no reason to doubt his "complete integrity".
"I believe him to be a fine, passionate and committed public servant who has done a huge amount of good for our city," he said.
Earlier on Sunday the former News International chief executive Rebekah Brooks was arrested by police investigating phone hacking and corruption.