Alex Salmond has formally started his legal action against the Scottish government over its handling of sexual misconduct complaints against him.
Two people have made allegations about the former first minister, who strongly denies ever sexually harassing anyone.
He is seeking a judicial review of a new complaints procedure that was introduced by the Scottish government in December.
His petition has been lodged with the Court of Session in Edinburgh.
The court will now seek a response from the Scottish government. It is likely to be some weeks before there is a hearing before a judge.
The complaints about Mr Salmond were made in January – just weeks after the new procedures for dealing with harassment complaints was introduced with the blessing of his successor, Nicola Sturgeon.
Ms Sturgeon had asked for the Scottish government’s existing policies to be reviewed and updated following wider concerns about harassment at Holyrood and Westminster.
Mr Salmond claims that the subsequent investigation into the allegations against him by senior Scottish government civil servants was “unfair and unjust”.
He said he had been given no opportunity to “see and therefore to properly challenge the case against me” and that he had “not been allowed to see the evidence”.
He has also described the allegations as “patently ridiculous”, and has written to the Scottish government’s top civil servant, Permanent Secretary Leslie Evans, urging her to investigate how the claims were made public.
Mr Salmond has claimed that someone within the Scottish government has “flagrantly and repeatedly” breached the confidential complaints process by leaking details to the Daily Record newspaper.
The Scottish government argues that a statement released by Mr Salmond on Thursday of last week contained “significant errors” about its procedures, with Ms Sturgeon saying it would “defend its position vigorously”.
It has insisted that its investigation into the two complaints against Mr Salmond have been “entirely confidential throughout”.
The Scottish government has passed details of the complaints to Police Scotland, and the force has said it is assessing the information.
The Daily Record newspaper says it has seen the wording of one of the complaints, which was made by a Scottish government staff member.
She alleges the former first minister touched her bottom and breasts through her clothing while she was alone with him at Bute House, the paper has reported.
The alleged incident is said to have taken place at the first minister’s official residence Bute House in Edinburgh in the first week of December 2013.
The paper claims the woman has alleged “multiple incidences of harassment and conduct of an unwanted sexual nature”.
Mr Salmond, who had two spells as leader of the pro-independence SNP, led the devolved Scottish government as first minister from 2007.
He quit in the aftermath of the independence referendum in 2014, when Scotland voted to remain in the United Kingdom.