Image copyright PA Image caption Mr Gormley's contract was due to expire at the end of this year

The chief constable of Police Scotland has resigned with immediate effect.

Phil Gormley had been on special leave since September amid a series of investigations into claims of gross misconduct.

The Police Investigations and Review Commissioner (Pirc) had been investigating five complaints, while a further two were being assessed internally.

Mr Gormley has always denied any wrongdoing.

But in a statement, he said he had come to the conclusion since "events" in November that it would be impossible to resume his duties in any meaningful way ahead of his contract expiring at the end of this year, regardless of the outcome of the investigations.

Mr Gormley had been told by the Scottish Police Authority (SPA) in November that he could return to work, but the decision was subsequently reversed after Justice Secretary Michael Matheson expressed concerns about it.

In a statement to the Scottish Parliament, Mr Matheson said he respected Mr Gormley's decision, which he hoped would allow policing in Scotland to move forward.

He also paid tribute to "all of those officers who have continued to serve the people of Scotland every day, helping to keep crime at historically low levels and making our communities safer".

'Health and wellbeing'

In his statement, Mr Gormley said the past eight months had been difficult for him and his family, and thanked his wife for her "love and loyalty".

He added: "I now need to prioritise the health and wellbeing of my family on whom these events have taken a significant toll.

"The support of colleagues from across the UK with whom I have served during the last 32 years has been a source of great strength.

"As chief constable of Police Scotland I have had the privilege to meet and work with some exceptional people, I wish them well for the future and it is in their interests that I feel it is right to step aside."

Image caption Mr Matheson told MSPs he hoped Mr Gormley's departure would help the force to move forward

Pirc confirmed that all of its misconduct investigations into the chief constable will now come to an end, and that reports containing all of the information that had been gathered will be submitted to the SPA.

Mr Gormley was named as the head of the Police Scotland in December 2015, before being sworn in the following month.

The single national force is the second-largest in the UK behind the Metropolitan Police, with about 17,000 officers.

Mr Gormley had previously been deputy director of the National Crime Agency, and had served as the chief constable of Norfolk Police.

No severance payment

The SPA, which oversees Police Scotland, said he would not be required to work his contractual notice period.

It said he would receive a payment in respect of his salary for his three month notice period, and for his outstanding annual leave entitlement.

But Mr Gormley will receive no other settlement or severance payment from the SPA.

Image copyright PA Image caption Mr Gormley's resignation comes two months after Susan Deacon took over as chairwoman of the SPA

SPA chairwoman Susan Deacon, who has previously backed the justice secretary in the row over the chief constable's future, said Mr Gormley had made a "significant contribution to policing in Scotland".

She said: "I would like to thank him for this contribution and wish him well for the future.

"This has been a challenging period for all concerned, and in the interest of policing in Scotland we now need to move on".

Her tribute to Mr Gormley was echoed by Deputy Chief Constable Iain Livingstone, who added: "My focus, and that of all officers and staff, will remain on day-to-day policing and serving the people of Scotland as we go forward."

What was the political row over Mr Gormley about?

Image copyright Getty Images Image caption Police Scotland is the second largest force in the UK, with 17,000 officers

In December it emerged that the SPA, under former chairman Andrew Flanagan, had agreed Mr Gormley's return to duty.

It had even drafted a press release in consultation with Mr Gormley's lawyers which said arrangements were in place to support the welfare of officers involved in the ongoing misconduct investigations.

The decision was reversed following an intervention from Mr Matheson, who told parliament key parties had not been consulted and there was a "particular concern" about the impact the chief constable's return could have on those who had made the allegations.

Mr Matheson said he had questioned "clear deficiencies" in the SPA's decision-making process, causing the body to reverse the move.

Mr Flanagan later told a committee of MSPs that Mr Matheson had told him it would be a "bad decision" to bring Mr Gormley back.

But he insisted he did not feel "directed" to halt the chief constable's return.

However, Mr Matheson was heavily criticised by Mr Gormley's lawyer David Morgan, who said there was "no lawful basis" for his intervention.

What has the reaction been to his departure?

The Scottish Police Federation, which represents rank-and-file officers, said Mr Gormley had made a "considerable contribution to policing over his long career."

Its chairwoman, Andrea MacDonald, said: "It is to his credit that he recognised continued speculation over allegations of misconduct were an ongoing distraction and, in the best interests of policing in Scotland, decided to resign. We wish him well in the future."

The Scottish Conservatives called on the justice secretary to "follow the chief constable out of the door".

The party's justice spokesman, Liam Kerr, said: "Mr Gormley makes clear in his resignation statement that it was the events of November 2017 - when Michael Matheson intervened to prevent his return to work - that made it impossible for him to carry on.

"Michael Matheson may hope that the stink hanging over this affair will clear with Mr Gormley's departure. It won't."

Labour's justice spokesman Daniel Johnson said: "Police Scotland has been riddled by crisis and controversy for years now, but the case of Phil Gormley descended into utter farce and raised serious questions about ministerial oversight.

"This sorry affair has dragged the reputation of Scottish policing through the mud and must be incredibly demoralising for rank and file officers who put their lives on the line to keep communities safe."

Scottish Greens MSP John Finnie, a former police officer, said Mr Gormley's resignation was in the "best interests of Police Scotland, the Scottish public and Mr Gormley himself."

Scottish Liberal Democrat leader Willie Rennie said Mr Gormley's resignation should not lead people to believe all of the problems in Police Scotland were now solved.