Scotland's former first minister, Alex Salmond, described allegations of sexual misconduct as "patently ridiculous" and announced he is taking the Scottish government to court over its complaints procedure.
Current First Minister Nicola Sturgeon said in a statement that the government would "defend its position vigorously".
Salmond is the subject of an inquiry after two complaints of sexual misconduct were made against him.
According to the local Daily Record newspaper, one of the alleged incidents took place at the first minister's official residence in Edinburgh in December 2013, when Salmond was first minister.
The complaints were made in January and the government's investigation is now complete, according to Sturgeon's statement. The Permanent Secretary to the Scottish Government — in charge of the investigation — has also informed Sturgeon that she intended to make the fact of the complaint public.
The Daily Record also reported that Salmond had been reported to police over the allegations.
But the politician, who described the allegations against him as "patently ridiculous" also took aim at the complaints procedure.
He said that he had not been allowed to see the case againt him nor enter into contact with current civil servants who may have wished to give evidence on his behalf, which prevented him from challenging the case againt him.
He also added that his attempts to resolve the issue "properly and amicably" through mediation and legal arbitration had been rejected.
"The procedure as put into operation by the Permanent Secretary is grossly unfair and therefore inevitably will lead to prejudicial outcomes," he wrote.
"It is therefore with great reluctance that I have today (Thursday 23rd August) launched a Judicial Review in the Court in the Court of Session which will decide the issue of the lawfulness of the procedure which has been used against me," he said.
"If I lose then I will have to answer to the complaints both comprehensively and publicly."
"If the Court of Session finds in my favour then the administration at the senior levels of the Scottish Government will have the most serious questions to answer," he added.
The government's response, issued on Friday, stated that it "refutes his criticisms of its process and will defend its position vigorously."
Sturgeon, who succeeded Salmond as head of the Scottish government after their Scottish National Party failed to secure the vote for independence in the 2014 referendum, said that their relationship "makes this an extremely difficult situation" for her to come to terms with.
"I am also acutely aware of how upsetting this will be for my party."
"However the over-riding priority must be to ensure fair and due process," she added.