Alex Salmond denies sexual misconduct allegations
The former Scottish first minister, Alex Salmond, has described sexual misconduct allegations against him as "patently ridiculous".
The claims date back to December 2013, when Mr Salmond was still in office, according to the Daily Record.
In a statement, he said he was taking the Scottish government to court to challenge the complaints procedure which had been activated against him.
The Scottish government said it would "defend its position vigorously".
And it said it was vital that any allegations of harassment were treated seriously and investigated thoroughly, regardless of who was said to have been involved.
The Daily Record said Mr Salmond was reported to police over allegations he sexually assaulted two staff members at the first minister's official residence at Bute House in Edinburgh in December 2013.
A Police Scotland spokesman said the force was "not going to comment on whether an inquiry is ongoing."
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.
In his statement, Mr Salmond says he refutes all of the allegations against him. He did not say what the claims were, but described some of them as being "patently ridiculous".
He also said that "on the advice of Senior Counsel" he had been complaining to the Scottish government's permanent secretary, Leslie Evans, that the complaints procedure was "unjust" and "unlawful".
The permanent secretary is responsible for the Scottish government's 5,000 civil servants, and is the principal policy advisor to Nicola Sturgeon, who succeeded Mr Salmond as first minister and SNP leader.
Mr Salmond said: "Even now I have not been allowed to see and therefore to properly challenge the case against me.
"I have not been allowed to see the evidence. I have tried everything, including offers of conciliation, mediation and legal arbitration to resolve these matters both properly and amicably.
"This would have been in everybody's interests, particularly those of the two complainants. All of these efforts have been rejected."
- Leader of Scottish National Party 1990-2000 and 2004-2014
- First Minister of Scotland 2007 - 2014
- Stood down after Scotland voted to remain in the United Kingdom
Mr Salmond said that "with great reluctance" he had launched a judicial review against the Scottish government at the Court of Session.
He said that if he lost the case he would have to answer to the complaints against him "both comprehensively and publicly".
But he warned that "the administration at the senior levels of the Scottish government will have the most serious questions to answer" if the court finds in his favour.
Analysis by Glenn Campbell, BBC Scotland political correspondent
This will send shockwaves through the country, not just the political bubble that Alex Salmond has operated in for many decades.
The story broke just after 10 o'clock last night, when Mr Salmond released a statement on his social media sites in response to a story in the Daily Record newspaper.
The headline from the statement is extraordinary enough - he is going to take the Scottish government to court, which given that he used to head that government is a remarkable development.
But it's even more extraordinary when you consider the reasons why. Mr Salmond has decided to challenge the Scottish government's complaints procedure after two people, according to Mr Salmond, lodged complaints against him.
He also says that he intends to give media interviews, perhaps as early as today.
Responding to his statement, a Scottish government spokesman said: "We can confirm that Alex Salmond has initiated legal proceedings against the Scottish government and as a result we are restricted in what we can say.
"However, the Scottish government will defend its position vigorously. As a matter of principle and integrity, it is vital that any allegations of harassment are treated seriously and investigated thoroughly, regardless of the identity of the party involved."
Mr Salmond was elected as the SNP MP for Gordon in 2015 before losing the seat in the snap general election two years later.
He has faced heavy criticism for hosting the Alex Salmond Show on Russian broadcaster RT, which has been described as a propaganda channel for the Kremlin - a claim Mr Salmond has denied.