Former Scottish First Minister and pro-independence figurehead Alex Salmond has appeared in court, charged with attempted rape and sexual assault.

Police Scotland confirmed earlier on Thursday that a 64-year-old man had been arrested and charged.

He was charged with two counts of attempted rape and nine counts of sexual assault, the Scottish prosecutor's office said.

Outside the court in the Scottish city of Edinburgh, Salmond denied committing any crime.

"I am innocent of any criminality whatsoever," he said. "I absolutely refute these allegations of criminality and I will defend myself to the utmost in court."

He was interviewed by police on Wednesday.

Salmond became Scottish first minister in 2007 and took Scotland to the brink of independence in an historic referendum in 2014 before stepping down.

A staunch nationalist, Salmond resigned from the Scottish National Party last year after it emerged the police were probing two harassment allegations against him.

He has fiercely denied the claims, which were formally raised with the Scottish government last January and date back to 2013 when he was still in office.

Salmond took legal action against the government - now led by former party colleague Nicola Sturgeon - over how it handled the complaints process against him in the case.

He won his judicial review earlier this month after the government conceded it had acted unlawfully while investigating the harassment claims against him.

However, Police Scotland last year launched their own separate investigation into the complaints, made by two female members of staff, eventually leading to Salmond's arrest, AFP reported.

Salmond's charisma has proved hugely effective through his career, particularly in the long campaign for independence.

But it also disguised what aides called an "explosive temper" and a talent for the scathing political put-down.

His supporters praise his unflagging determination and his political know-how, while his opponents brand him arrogant and misogynistic with a penchant for populism.

Many on both sides agree that he is one of the most talented politicians of his generation.