Alex Salmond, Scotland's former first minister, has been charged with two counts of attempted rape as he faces 14 offences.
In total, he has been charged with two counts of attempted rape, nine counts of sexual assault, two of indecent assault and one breach of the peace, the Crown Office said.
After a hearing at Edinburgh Sheriff Court in front of Sheriff Frank Crowe, which lasted less than five minutes, a defiant Mr Salmond (64) talked outside court to insist he was "innocent of any criminality whatsoever".
He said: "I refute absolutely these allegations of criminality and I'll defend myself to the utmost in court. I've got great faith in the court system in Scotland, which is where I'll defend myself."
Saying he wanted to say more but was shackled by the legal proceedings, he repeated he will defend himself in court before he returned to the courthouse to talk to his legal team.
Mr Salmond had earlier appeared in private at the court before making a statement outside to the gathered media.
Having pulled up in a car, he shook hands with two men as he made his way into court amid a scrum of journalists.
Mr Salmond had been arrested on Wednesday night and a Police Scotland spokeswoman said: "We can confirm a 64-year-old man has been arrested and charged and a report will be sent to the procurator fiscal. Proceedings are now live under the contempt of court act."
A report had been sent to the procurator fiscal, Scotland's prosecution service.
Speaking after First Minister's Questions at Holyrood - the Scottish Parliament in Edinburgh - Nicola Sturgeon, Mr Salmond's former deputy in the Scottish Government and SNP, said: "Obviously, this news will be a shock to many people. But as Police Scotland have made clear this morning these are now live criminal proceedings.
"That means now, more than ever, it would be completely inappropriate for me or anybody else for that matter to make any comment on the situation."
Ms Sturgeon added: "It will be a shock for many people but for the reasons I've just outlined I'm not going to comment further."
Ken Macintosh, the Scottish Parliament's presiding officer, told MSPs prior to First Minister's Questions: "Members will be aware of reports in the media this morning that the former first minister Alex Salmond has been arrested.
"As I hope members will also be aware, and as applies with all such matters, that means that parliamentary rules on sub judice apply as this case is now active."
Mr Salmond, from Linlithgow in West Lothian, was Scotland's first minister from 2007 to 2014 after leading the SNP to power for the first time. He led the party for 20 years in two stints but resigned his membership of the party in August 2018.
He guided the SNP to a narrow Scottish election win in 2007 and then led a minority government as he became the first SNP first minister.
In the 2011 election, he led the party to an unprecedented majority win, meaning the SNP's manifesto pledge to hold an independence referendum could be delivered. But voters rejected separation from the UK by a margin of 55pc to 45pc and he stepped down as first minister and SNP leader, with Ms Sturgeon succeeding him.
The news comes two weeks after Mr Salmond was at the Court of Session in Edinburgh, where the Scottish Government conceded its internal investigation of complaints against him was flawed.
He had launched a judicial review over how it had handled its inquiry, saying he had been treated unfairly. That case was focused on the government's processes, not the substance of the complaints, which Mr Salmond has denied.
© Daily Telegraph London