Rebekah Brooks denied having a six-year affair with Andy Coulson, as she was quizzed about a letter she wrote to the former News of the World editor.
The 45-year-old ex-tabloid editor told the Old Bailey that the pair had periods of "physical intimacy" in 1998, from 2003 to 2005 when her marriage to actor Ross Kemp was on the rocks, and finally in 2006.
Brooks said the letter, found on her computer by police investigating alleged phone hacking, was probably written "after a few glasses of wine".
TOP STORIES TODAY
- Sports minister suggests women try 'feminine' pursuits like cheerleading
- WATCH: Mehdi Hasan on the benefits row and Tony Blair
- Ukraine president announces 'peace deal' after country's bloodiest day
- British tourist suspected of swallowing 'rare as hen's teeth' pink diamond
- Japanese fishermen believe giant squid influx could be bad omen
The date stamp on the file suggested it was written in February 2004, the court heard.
Brooks told the jury: "I seem to remember sometimes I would write things down to myself. Obviously it's a letter and I probably woke up the next morning and thought better of it. I don't think I finished it, in fact.
"I don't know if anyone has been in this situation but at a time of hurt you come home at night and have a few glasses of wine and you probably shouldn't go on a computer but obviously that's what I did. I wrote my feelings down at that moment...
"Obviously I wrote it in a letter form. Perhaps with the intention of finishing it and sending it but I probably thought better of it the next day."
She denied prosecution claims that she and her former deputy Coulson were in a relationship for six years.
"Firstly, it's not true," she told the Old Bailey. "I know that's what the police and prosecution say, having analysed the letter.
"At the time I wrote this, I was in a great deal of emotional anguish, as I think you can tell from the letter, and the six-year period was me referring back to 1998. Obviously I've read that a lot since the police seized it. I have probably over-analysed it."
The jury has already seen the highly-charged letter. It said: "The fact is you are my very best friend. I tell you everything, I confide in you, I seek your advice, I love you, care about you, worry about you. We laugh and cry together... in fact without our relationship in my life, I am really not sure how I will cope.
"I'm frightened to be without you... but bearing in mind 'the rules' you will not know how I am doing and visa versa. The thought of finding out anything about you or your life from someone else fills me with absolute dread."Suggest a correction