Former News International chief executive Rebekah Brooks and ex-News of the World editor Andy Coulson had an affair for at least six years, a jury has heard.

Prosecutor Andrew Edis told jurors at the Old Bailey that in February 2004, when the pair were both working at the media giant, they had been having a relationship for some years.

He said a letter was found on Mrs Brooks's computer from February 2004, that made the relationship clear.

Mr Edis said: "The point that I'm going to make in relation to that letter is that over the relevant period, what Mr Coulson knew, Mrs Brooks knew too. And what Mrs Brooks knew, Mr Coulson knew too - that's the point.

"Because it is clear from that letter that, as of February 2004, they had been having an affair which had lasted at least six years."

Mr Edis said the closeness of their relationship showed that both knew as much as each other in how staff at their tabloid were operating.

Both have denied conspiring to hack into phones or making illegal payments to public officials.

Mr Coulson went on to become the chief media spokesman for Prime Minister David Cameron.

Mrs Brooks, a close confidante to Rupert Murdoch, ran his British newspaper arm from 2009 to 2011.

Rival journalists voicemails hacked

Earlier, the court heard that a news editor at the News of the World had the voicemails of other journalists hacked in a "dog-eat-dog" competition for stories.

Mr Edis told jurors that they will have to consider how much pressure reporters at the Sunday tabloid were under to get stories amid tightening budgets.

He claimed that senior editorial staff must have known how money was being spent, including around £100,000 (€117,000) per year paid to Glenn Mulcaire, who has already admitted phone hacking.

Mr Edis said: "It is, of course, part of the prosecution case that a contract like that, a big contract, involves the senior management, in this case the editor, the deputy editor and the managing editor - the three defendants whom you have to try for phone hacking in addition to Mr (Ian) Edmondson - that is Rebekah Brooks, Andrew Coulson and Stuart Kuttner."

Mrs Brooks, Mr Coulson, Mr Edmondson, and Mr Kuttner all deny conspiring with others to hack phones between 3 October 2000 and 9 August 2006.

The court heard that the police investigation into phone hacking in 2011 was sparked by the discovery of three emails that News International gave to officers.

The messages, from Mr Mulcaire to Mr Edmondson in April 2006, are said to be about hacking phones linked to Tessa Jowell and David Mills; Lord Frederick Windsor, son of Prince and Princess Michael of Kent; and an adviser to Lord Prescott.

The court was told that the News of the World also hacked journalists from rival paper the Mail on Sunday to find out what information they had on a story about John Prescott's affair with his secretary, Tracey Temple.

Mr Edis said Mr Mulcaire began hacking Lord Windsor's phone just minutes after allegedly speaking with Mr Edmondson.

He told the jury it was not a secret among News of the World  journalists that Mr Mulcaire worked for the paper and he was described as working for the paper's special investigations team in a story in the newspaper in August 2002.

Mr Edis told jurors: "You're going to have to form a view about how much pressure there was on journalists at the NotW to get stories, so that they strayed sometimes into crime in order to do it.

"And also how much the editor was involved in the whole process."

The jury heard that there was a clampdown on spending at the newspaper in 2001, and as part of a series of warnings staff were told there would be "the most severe consequences" if they exceeded their budgets.

Mr Edis said Mrs Brooks, Mr Kuttner and Mr Coulson were working together to rein in spending, and therefore must have been aware of the sums being paid to Mr Mulcaire.

The prosecutor told the court: "That's the point which we say generates the inference that they must have known what was going on with Mr Mulcaire."

The court heard that in August 2001, when rules about how regular contributors were paid changed, Mr Mulcaire was a "major exception".

Jurors were told that Mr Kuttner authorised 221 separate payments totalling £413,527 (€487,466) to Mr Mulcaire "over the years", amounting to 72% of what Mr Mulcaire earned during that time.

The court also heard a recording of "accomplished blagger" Mr Mulcaire getting a voicemail password reset by a mobile phone company.

Ex-News of the World and Sun editor Mrs Brooks is also charged with two counts of conspiring with others to commit misconduct in public office - one between 1 January 2004 and 31 January 2012 and the other between 9 February 2006 and 16 October 2008 - linked to alleged inappropriate payments to public officials.

Fellow ex-News of the World editor and former Downing Street spin doctor Mr Coulson is also facing two allegations that he conspired with former royal editor Clive Mr Goodman, and other unknown people to commit misconduct in public office - between 31 August 2002 and 31 January 2003, and between 31 January and 3 June 2005.

It is claimed that Mr Goodman paid Buckingham Palace policemen for copies of royal phone directories - allegedly authorised by Mr Coulson - to get information on members of Britain's royal family.

Mrs Brooks also faces two allegations of conspiracy to pervert the course of justice - one with her former personal assistant Cheryl Carter between 6-9 July 2011; and a second with her husband, Charles Brooks, and former head of security at News International, Mark Hanna, and others between 15-19 July 2011.

The allegations relate to the alleged removal of Mrs Brooks's notebooks from the News International archive by Ms Carter, and to "quite a complicated little operation", allegedly involving Mr and Mrs Brooks and Mr Hanna, to hide material from police investigating phone hacking.

Coulson met Blunkett over affair

The court heard that Andy Coulson confronted former home secretary David Blunkett over an affair he was having with a married woman, the phone hacking trial has heard.

Mr Coulson told Mr Blunkett in August 2004 that he had discovered his affair with Kimberly Quinn from "extremely reliable sources".

Mr Edis told the jury that the information had in fact come after the newspaper hacked Ms Quinn's phone.

He told the Old Bailey that Mr Blunkett recorded the meeting with Mr Coulson on 13 August 2004, in which the editor advised him that the News of the World was planning to publish a story about his relationship with Ms Quinn.

In the recording, Mr Coulson - who looked above the judge's head while it was played to the court - told Mr Blunkett: "There's no desire at all to cause you damage, politically or otherwise. We would not want to see anything published that would cause you damage."

Mr Blunkett, who was not married at the time, replied: "A private life is private. If you don't have a private life we don't have anything."

In the recording, Mr Coulson told Mr Blunkett that he was confident in the information, which proved the politician had had a three-year affair, and told him: "My job is to sort out the nonsense from the accurate.

"I believe if I don't do this story at least one of my sources will take this information to another newspaper. People talk. It's known."

But when asked about information that the story was based on, he said: "It is based on extremely reliable sources," and he added: "I am not able to lay out clear-cut evidence but I believe it to be true.

The court heard that a story about Mr Blunkett's affair with a married woman, who was not named in the initial story, was published on 15 August.

Recordings of voicemails left on Ms Quinn's phone revealed the affair, the court heard.

They included a message from a "clinic" telling her that she was due to come in for a scan, revealing that she was pregnant, the court heard.

Mr Edis told the jury: "We say it is absolutely inconceivable that a newspaper would publish a story of that kind about a serving cabinet minister without knowing it was true.

"Mr Coulson did know it was true ... because of the voicemails which had been obtained as a result of tasking Glenn Mulcaire, who by August 2004 had been working regularly for the News of the World for four years.

"We say to you that's very strong evidence against Mr Coulson of involvement in phone hacking at the News of the World."