Alex Salmond's legal challenge over how the Scottish government handled sexual harassment allegations against him has called in court for the first time.
The former first minister is pursuing a judicial review into the process used to investigate the two complaints, which he denies.
A four-day hearing will be held at the Court of Session in Edinburgh from 15 January of next year.
Preparations were finalised during a brief procedural hearing on Tuesday.
Mr Salmond was not in court for the hearing, which saw various dates set for the exchange of paperwork.
A separate police investigation into the allegations is ongoing and will not be affected by the judicial review, which focuses entirely on the government's processes.
The complaints against Mr Salmond were made in January of this year, weeks after new procedures for dealing with harassment claims were introduced by the government.
The former SNP leader claims the subsequent Scottish government investigation was "unfair and unjust", and that the allegations were "patently ridiculous".
He resigned from the SNP in August and launched a crowdfunder to help pay for a judicial review of the process.
The government has said it is "confident" that its approach is "legally sound", and said it would defend its position "vigorously" in court.
Mr Salmond's argument is that he was given no opportunity to "see and therefore properly challenge the case against me", and that he had "not been allowed to see the evidence".
On Tuesday, the court heard that the Scottish government will argue that Mr Salmond was informed about the allegations and does not "have a relevant case as a matter of law".
Reference was also made to a dispute over whether one of the complaints had been raised informally prior to the formal complaint being logged in January.
The government had previously denied that there were any recorded complaints regarding Mr Salmond before January 2018.
Judge Lord Pentland said this was a matter of fact which should be settled by agreement between the two parties.
Government lawyer Christine O'Neill said she would have to take instruction from her clients, but argued that anything predating a formal complaint was "essentially irrelevant".