A woman has claimed that photographs were taken of her as Alex Salmond grabbed hold of her bottom.
The former civil servant, known as Woman K, said the photographs were taken at an event at Stirling Castle shortly before Mr Salmond stood down as first minister.
She told the High Court in Edinburgh that the images showed the “look of disbelief” on her face.
Mr Salmond denies sexually assaulting Woman K in November 2014.
He has also pled not guilty to a further 13 charges of sexual assault against nine other women.
The alleged offences are all said to have happened when Mr Salmond was serving as Scotland’s first minister and the leader of the SNP.
Giving evidence on the fifth day of the trial, Woman K claimed that Mr Salmond had been “very insistent” that she have her photograph taken with him.
She alleged that, as she was standing in front of the photographer with him, Mr Salmond put his arm around her before he “reached down and grabbed hold of my backside”.
Woman K said Mr Salmond had done this “quite forcefully with his full hand” and it had felt “very deliberate”.
She said she had felt “shock and disbelief” but had tried to “just keep smiling”.
She said: “I just want to do my job and feel proud of myself doing my job and it felt like I was being demeaned.
“It was unprofessional but there was nothing I could do about it.”
The court was shown a series of photographs of the woman with Mr Salmond.
She appeared to have her eyes shut in several of them, and to be looking at Mr Salmond in another.
Woman K told the court that she looked “very embarrassed” because of “what had just happened”.
She said another photograph shown to the court showed a “look of disbelief” on her face.
The witness said she had no choice but to get on with her job, but the next day she told her manager what had happened “to make sure he was aware”.
What has the trial heard so far?
Woman K later agreed with defence lawyer Gordon Jackson QC when he put it to her that she had thought the alleged incident “wasn’t sexual, it was about power”.
She said: “That was my interpretation. The first minister grabbed by backside because he could.”
She also agreed she had once described Mr Salmond as “genuinely concerned and nice” when she became unwell at work, and had phoned him the next day to thank him for helping her.
Woman K also said that she had already contacted the Scottish government before it set up a helpline for people to report any allegations of inappropriate behaviour.
But she agreed that at that stage she wanted the complaint to go through the government rather than the police.
Mr Salmond, who stood down as first minister on 20 November 2014, says he is innocent of all the allegations against him.
He has entered not guilty pleas to all 14 of the charges against him, which include one charge of attempted rape, one of sexual assault with intent to rape, 10 sexual assaults and two indecent assaults.