Mark Tyrrell, 57, denies two counts of rape, 11 counts of sexual assault and four counts of assault by penetration against the woman, who cannot be named.
Opening the trial, prosecutor Catherine Farrelly KC told jurors that Tyrrell had been trained in Sexual Offences Investigation Techniques, a course designed to equip officers to deal with victims of sexual offences.
The court heard that concerns were first raised when officers visited the woman's home on an unrelated matter and found Tyrrell hiding beside her bed. He later phoned her and said nothing sexual had happened, jurors were told.
Tyrrell is also accused of perverting the course of justice by attempting to delete messages between them. In one message, the prosecution alleges, he apologised for "being a sex offender" and for ruining her life. When she told him not to say such things, he replied that they were true.
The prosecution alleges Tyrrell raped the woman by having sex with her after she had repeatedly said no. Afterwards, he allegedly asked whether she realised that what he had done "was rape", and said he would report himself and would undoubtedly go to prison.
The woman alleges that on several occasions she woke to find Tyrrell penetrating her, despite having refused sex the night before. When she asked him what had happened on one occasion, he shouted at her and asked whether she realised what she was saying and what could happen to him.
Jurors heard the woman kept a list of incidents involving Tyrrell, including the alleged assaults. In a police interview she said she had felt pressured by him and feared no one would believe her because she could not prove what had happened. She also worried police would protect him because he was an officer.
The police watchdog began an investigation in April 2023 after the Metropolitan Police made a referral.