Britain's most senior police officer is to retire seven months before the end of his contract.

The dramatic announcement of Sir Bernard Hogan-Howe's departure after five years as head of Scotland Yard came in the wake of suggestions of tensions with new London Mayor Sadiq Khan.

However, Sir Bernard denied he is stepping down because of fears that Mr Khan would not reappoint him - and insisted the decision was not connected to a forthcoming report on the Metropolitan Police's handling of historical abuse allegations.

The 58-year-old, who was appointed Met Commissioner in 2011, had been expected to remain in the role until at least September next year.

Theresa May, who was then home secretary, announced in February that she had recommended a 12-month extension to his five-year contract, which had been due to expire this month.

Legislation allows for an initial extension of up to three years. This can then be followed by unlimited one-year extensions.

However, in an unexpected development, the force announced that Sir Bernard was to retire - remaining in the post until February 2017 to allow the Home Secretary and Mayor to appoint a successor.

Sir Bernard said: "It has been a great privilege to be the Met's Commissioner. I have loved my time in the role and I have loved being a police officer. It's the most rewarding of jobs to protect good people and lock up the bad guys."

In an interview, he insisted he had an "excellent" relationship with Mr Khan, and denied that he had chosen to leave early rather than face not being reappointed.

In the latter part of Sir Bernard's tenure, the Met was engulfed in a storm of controversy over Operation Midland, its doomed investigation into VIP paedophile claims which closed in March without a single arrest.

A former High Court judge was called in to examine the handling of investigations involving historical abuse claims, with the report expected to be submitted in the coming weeks.

Sir Bernard said his decision was "not at all" connected to the report's publication, saying he would still be in his role when it comes out.

Mr Khan insisted he had nothing to do with Sir Bernard's decision to retire and said he did not want him to go.

"It's to do with Bernard's decision to retire," he said. "I didn't want him to go, we worked incredibly well together. But I am grateful he gave me and the Home Secretary sufficient notice."

In a statement, the Mayor thanked Sir Bernard "for his years of service", saying he "oversaw the excellent policing of the 2012 Olympic Games and has taken big steps towards making our police service more representative of London".

Home Secretary Amber Rudd thanked Sir Bernard "for the leadership he has shown as Commissioner, and his work to keep the communities of London safe and the United Kingdom secure against the backdrop of a heightened terror threat".

She added: "Sir Bernard has had a long and distinguished career as a determined crimefighter and an inspirational senior officer.

"He has shown remarkable and consistent dedication to public service. Among his many achievements in London was the delivery of a safe and successful 2012 Olympics."

Crime has fallen by around 18% while public confidence in the service has risen during the Commissioner's time in charge, the Met said.

It pointed to the successful security operation for the 2012 Olympics, adding that Sir Bernard has kept 32,000 officers in London amid "acute financial challenges".