An intelligence officer tried to fend off her married spymaster's advances by setting him up with a colleague who had a history of affairs, a tribunal heard.
But the senior official, who can be named only as Mr F, said he had rejected the suggestion, explaining the officer - Miss D - "tried to tell me someone would be interested in me in the office. I said I was not interested".
Miss D, who claims that Mr F was pursuing her for an affair, said she tried prove she was not interested by suggesting he sleep with the female staff member, known as SW.
She said: "I had had a discussion in the office with him.
"She had a lot of casual relationships and I suggested that as he wanted an affair, would SW be suitable because she told me she had slept with a previous manager and she spoke about her open relationships in the office.
"It shows how desperate I was."
Miss D is accusing Mr F of sexual harassment, claiming he stroked her legs and sent her sexual messages at their workplace.
In cross-examination at Central London Employment Tribunal, Mr F said the only contact he had had with SW outside work was when she once allowed him to park outside her home in order to pick his son up from a sports training programme nearby.
He said: "When we got to the location, I had about 20 minutes until I was due to collect him so she invited me in, we had a cup of tea and a chat and then I left and took my son home."
Mr F also denied "setting her up to fail" when managers believed Miss D's performance was suffering after she helped to organise an events day within the secret agency.
Miss D claims he kept her in the dark and did not let on that her performance was under review, but Mr F said: "I wanted to give her the opportunity to produce something...rather than raise it as an issue."
He added: "The bottom line for me was that the claimant was just asked to do her job irrespective of whether she was going to be monitored more closely or not."
Cross examining him, Miss D said the purpose of a meeting set up with managers to discuss her performance "was that you were going to try to get me to surrender and say that the job was not right for me and get someone else in."
Asked by Judge Sigsworth: "Are you saying that F influenced the senior management team to get you out of the division?" she replied: "I think so.
"He was afraid I would say something. Even though he said he would wipe the floor with me, once he knew that the affair would not happen, his attitude changed towards me. I do believe he influenced [senior managers] LL and JM."
The hearing heard that several staff members made complaints about her attitude towards them whilst organising the events day.
Asked why he had not initially chased it up or made a log of it, he said: "At the time I fielded the comments because it was a highly pressurised time and she was doing what she needed to do.
"But it does not take away the fact that she made these individuals want to come and speak to me."
At the time, he had referred to a "no-nonsense culture and if people say the wrong thing they get trodden on."
Explaining his comment, he said: "It was demonstrating that niceties tend to go out of the window when a job needs to be done.
"In the environment in which we work, people are under a lot of pressure and people do get quite prickly."
Miss D is claiming sexual discrimination against Mr F and their agency. Both deny her claims.