Scotland's justice secretary still has "serious questions" to answer following the departure of chief constable Phil Gormley, opposition parties have said.

Michael Matheson addressed MSPs in the wake of Gormley's announcement, saying he hoped it would allow Police Scotland "to move forward".

But Scottish Labour said the minister still has questions to answer about his own conduct during an affair it said had "dragged the reputation of Scottish policing through the mud".

The Scottish Conservatives renewed calls for the justice secretary to quit, saying he should "follow the former chief constable out of the door".

Gormley tendered his resignation with immediate effect on Wednesday, meaning Scotland's national police force will now have to appoint its third chief in five years.

It came as the beleaguered chief constable was facing five separate investigations into misconduct by the Police Investigations and Review Commissioner (Pirc).

As a result of the probes, Gormley had been on special leave since September and said in Wednesday's statement that it was "impossible" for him to resume his duties.

He always denied any wrongdoing.

It emerged that in November, the SPA's former chairman Andrew Flanagan had attempted to have Gormley return to active duty.

Matheson intervened in this decision, asking if proper procedure had been followed to reinstate the chief constable, following which the decision was reversed.

This led to opposition parties accusing the justice secretary of interfering in the nominally independent organisation and the Tories' call for him to quit - demands Matheson has roundly rejected.

The justice secretary also received the support of the SPA's new chairwoman Susan Deacon, who criticised her predecessor Flanagan's handling of the matter and said Matheson would have been "failing in his duty had he not asked those questions".

Commenting on Gormley's resignation, the Scottish Conservative shadow justice secretary Liam Kerr said: "Mr Gormley's resignation brings a close to one of the issues contributing to one of the most troubled periods in the history of the single force.

"However, it does not close down many of the questions hanging over this sorry episode.

"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.

"It suggests that, less than two years after his appointment, the SNP Government intervened to force him out."

He added: "Michael Matheson may hope that the stink hanging over this affair will clear with Mr Gormley's departure.

"It won't. That will only happen when Mr Matheson does the decent thing and follows the former chief constable out of the door."

But addressing Holyrood on Wednesday, the justice secretary maintained that his actions had been "entirely appropriate".

Matheson said: "I respect the decision of the chief constable and hope this enables policing in Scotland to move forward with a clear focus on delivering the long-term strategy Policing 2026 that Phil Gormley helped to develop.

"I've spoken with Susan Deacon, chair of the Scottish Police Authority, which will undertake the process of appointing a new chief constable.

"Professor Deacon informed me yesterday that the SPA were in discussions with the chief constable's representatives regarding his future and provided assurance that the appropriate process was being followed."

He added: "I am very clear that my actions in questioning the SPA on November 9 were entirely appropriate, indeed were expected of me."

Scottish Labour's shadow justice secretary 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.

"Regardless of Mr Gormley's decision to resign, there are still serious questions for Michael Matheson to answer."

Willie Rennie, leader of the Scottish Liberal Democrats, commented: "The rate at which Chief Constables and SPA bosses have come and gone points to a much deeper issue.

"Problems are hardwired into the structures they are operating within.

"Powers over policing should be shared across more individuals and communities to avoid these situations, rather than hoarded on the desk of the justice secretary.

"An independent expert review of how policing structures are operating is essential to inject accountability, transparency and localism back into the system."