Two immigration judges were blackmailed by a Brazilian cleaner who threatened to expose them for employing her illegally, a court has heard.
Roselane Driza denies two counts of blackmail and theft
The judges, a man and woman known in court as I and J, both employed Roselane Driza, but later sacked her the Old Bailey was told.
Judge I had a relationship with her and Ms Driza later stole videos of him having sex, it is alleged.
Ms Driza, 37, from South Norwood, south London, denies blackmail and theft.
J had advertised for a cleaner and interviewed Ms Driza, who told her she was a student who had been granted refugee status, the court heard.
But in fact she was an "overstayer" who was working illegally, a fact she would later use to blackmail J, said David Markham, prosecuting.
J introduced Ms Driza to I, a colleague at the Asylum and Immigration Tribunal and former lover, with whom she had remained good friends.
When J sacked Ms Driza in the summer of 2004, after accusing her of becoming "too intrusive in her personal life", I decided it would be "prudent" to end her employment with him as well, the court heard.
But I told the Old Bailey on Thursday he had started a relationship with Ms Driza after she stopped being his cleaner.
He did not tell J that Ms Driza had moved in with him and when she found out she was "appalled", the court heard - leading him to end the relationship with Ms Driza to save his friendship.
The court was told he found it hard to get Ms Driza to leave and that she continued to live at his flat rent-free, the court heard.
The prosecution claim Ms Driza threatened to expose J to her "boss", Lord Falconer, for employing her without a work permit, unless she was paid £20,000.
She told I she would make a similar complaint against him, and also took two videos of him having sex with other women and threatened to send them to his superiors, the court heard.
'Consumed with rage'
She was still at I's flat when she was arrested on 25 October 2005.
Asked by Frances Oldham QC, defending, why he was still sleeping with her in 2005, I said it was because he did not want her to pursue her threats.
Mrs Oldham said: "Your motive of being friendly with the defendant was entirely for your own selfish reasons.
"You were using her as a cheap housekeeper with whom you were able to enjoy sex."
She added that there was a lot of jealousy between all involved - she has accused J of being "consumed with rage" when she heard about Ms Driza's relationship with I.
I also admitted some jealousy on his part over J's relationship with another judge.
The trial continues.