MSPs are to hold an inquiry at Holyrood into the Scottish government's handling of the Alex Salmond investigation.
The government admitted in court on 8 January that the way it dealt with sexual harassment complaints against the former first minister was unlawful.
On Sunday, Nicola Sturgeon said she would refer herself to parliament over claims she broke the ministerial code.
And in a new development on Tuesday it was decided that a full Holyrood inquiry would be held.
A special committee will be set up to conduct the probe, which will focus on how the complaints were handled and the circumstances surrounding meetings between Ms Sturgeon and Mr Salmond during the investigation.
The first minister told BBC Scotland that she would "cooperate with all and any inquiries", and this was echoed by Mr Salmond.
A police inquiry into the complaints themselves, which Mr Salmond denies, is ongoing.
The Information Commissioner's Office is also looking into a complaint from Mr Salmond about how information about the investigation made its way into the press.
An internal investigation was set up in January 2018 after two government employees made allegations of sexual harassment against Mr Salmond.
However, after Mr Salmond quit the SNP and launched a judicial review complaining that the probe had been "unfair", the government was forced to concede that rules had been broken as its investigating officer had prior knowledge of the case and had spoken to the two complainers before being appointed to the role.
The government insists that its complaints handling and investigation process is "robust", but was let down during the Salmond probe by a "single procedural flaw" when an investigating officer was appointed to the case who had previously had contact with the women making the complaints.
The former first minister claimed the case at the Court of Session could cost the government up to £500,000.
Attention at Holyrood has subsequently turned to the involvement of Ms Sturgeon, who told MSPs that she had spoken with her predecessor five times during the course of the investigation.
She referred herself to the independent advisers on the ministerial code after Labour claimed she may have broken it in the course of these meetings.
Members on the parliament's business bureau, which manages the running of Holyrood, were unanimous in agreeing that an additional public inquiry should be held.
A parliament spokeswoman said officials had been "asked to prepare options on its remit and membership", and said these would be discussed at future meetings.
The idea was proposed by the Scottish Conservatives, and interim party leader Jackson Carlaw said he was pleased that MSPs had backed the plan.
He said: "An investigation has been botched, two complainants have been let down, and hundreds of thousands of pounds of taxpayers' money has been wasted. These are clearly matters for the Scottish parliament to investigate, and the inquiry must be able to examine what went wrong and why this was allowed to happen."
Scottish Labour leader Richard Leonard added that "full transparency in this matter is essential in order for he public to have confidence in the first minister and the Scottish government".
Ms Sturgeon told MSPs last week that she was "perfectly happy for parliament to hold an inquiry", saying that she would "ensure that all parts of the Scottish government cooperate fully with it".
She said: "If there is a parliamentary inquiry, we will, of course, make all appropriate information available.
"I am satisfied that I conducted myself appropriately and in line with all the rules, but parliament will perform its scrutiny role in the best way that it considers necessary."
A spokesman for Mr Salmond said the former first minister would be "happy to cooperate, in principle and if asked, with a parliamentary inquiry".
He added that Scotland's top civil servant, Permanent Secretary Leslie Evans, "should already have accepted the responsibility for the expensive farce" of the collapsed investigation.
'The other side'
The collapse of the government investigation and questions over Ms Sturgeon's involvement in it have sparked a row between her team and supporters of Mr Salmond, with a spokesman hitting out at "an attempt to smear" the first minister in the press.
This continued on Tuesday, with the first minister's spokesman accusing "the other side" of pursuing a "vendetta" against Ms Sturgeon's chief of staff, Liz Lloyd.
Questions have been raised about when Ms Lloyd learned of the complaints against Mr Salmond, with the former first minister's team insisting she was aware of them "some time" in advance of a meeting at Ms Sturgeon's house in April 2018.
On Tuesday, Geoff Aberdein - Mr Salmond's former chief of staff, who helped set up the meetings between the two politicians - said Ms Lloyd met with him twice in March.
He said she "suspected" that an official complaint had been made about Mr Salmond, although "she made clear she did not know the full details and had not alerted the first minister to her suspicions".
A spokesman said Ms Sturgeon had full confidence in her chief of staff.