Nicola Sturgeon has told an inquiry any suggestion she "acted with malice" or "plotted" against her predecessor Alex Salmond is "absurd".
Addressing a Scottish Parliament hearing in Edinburgh this morning, the first minister said she acted "properly and appropriately" in the handling of harassment claims against her predecessor.
Ms Sturgeon is facing calls to resign over claims she misled parliament over the investigation.
She said she was "relieved" to be finally giving evidence to the committee, but said: "I feel I must rebut the absurd suggestion that anyone acted with malice or plotted against Alex Salmond. That claim is not based in any fact."
Ms Sturgeon said she cared for Mr Salmond "for a long time" and that the situation has been one of the "most invidious" of her life.
"Alex Salmond has been for most of my life, since I was about 20, 21-years-old, not just a very close political colleague, a friend, someone in my younger days who I looked up to and revered," she said.
"I had no motive, intention, desire to get Alex Salmond."
But she added that although he was cleared in a criminal trial, Mr Salmond's description of his behaviour against women was "deeply inappropriate" and she "tried to do the right thing".
"A number of women made serious complaints against him," she said.
"I have searched my soul many, many times on all of this. It may very well be that I didn't get everything right, that's for others to judge.
"But in one of the most invidious political and personal situations I have ever faced, I believe I acted properly and appropriately, and overall, I made the best judgments I could."
She also said Mr Salmond was a "tough and challenging person to work for".
Ms Sturgeon is accused of breaking the ministerial code by failing to report the meeting she had with Mr Salmond on 2 April 2018 when he told her about the harassment claims against him.
She said that the meeting at her home in Glasgow was "firmly in the personal and party space" and that if she did declare it, she would have been "breaching the confidentiality of the process".
"It was for those reasons I didn't immediately record the 2 April meeting, or the subsequent phone call in 23 April, in which Mr Salmond wanted me to tell the permanent secretary that I knew about the investigation and persuade her to agree to mediation," she said.
Opposition members claim she knew about the meeting four days beforehand on 29 March.
But she insisted that 2 April was when "any suspicions I had or general awareness there was a problem became actual and detailed knowledge".
She accepted that a "very serious mistake" was made when investigating the complaints against Mr Salmond and apologised to the two women who lodged them.
"Two women were failed and taxpayers' money was lost, I deeply regret that," she told the hearing.
Mr Salmond was acquitted of 13 charges following a criminal trial and he won £512,000 after a judicial review ruled the investigation into them was "tainted by apparent bias".