Prosecutors say News of the World executives knew that staff were routinely hacking celebrities' phones.

IN A blockbuster declaration at Britain's phone hacking trial, a prosecutor said two former senior tabloid executives - Rebekah Brooks and Andy Coulson, later a top aide to Prime Minister David Cameron - had an affair lasting at least six years.

Prosecutor Andrew Edis made the disclosure during Coulson's and Brooks' trial on phone hacking and other charges, the first major criminal case to go to court in the hacking saga that has shaken Britain's political, judicial and media elite.

Brooks, Coulson and six other people are now on trial, including Brooks' current husband Charles. All deny the various charges against them, which range from phone hacking to bribing officials for scoops to obstructing police investigations.

Mr Edis said the relationship between Brooks and Coulson was relevant to the hacking case because it showed they trusted one another and shared intimate information.

Mr Edis said the affair began in 1998 and lasted about six years. If his timeline is correct, the affair ended before Coulson became Mr Cameron's top communications director, which began after Cameron's election in 2010. Coulson started working for Mr Cameron in 2007, when Mr Cameron became leader of Britain's Conservative opposition party.

The affair covered the period when Brooks was the top editor of the News of the World tabloid and Coulson was her deputy. Brooks edited the paper from 2000 to 2003, then went on to edit its sister paper, The Sun, and later became the chief executive of Rupert Murdoch's British newspaper division. Coulson edited the News of the World from 2003 to 2007.

The affair covered the crucial period in 2002 when the News of the World hacked the phone of murdered teenager Milly Dowler. Brooks has long denied knowing about that hacking. When the Dowler hacking case became public in 2011, the outrage in Britain was so great that Mr Murdoch shut down the 168-year-old paper.

Mr Edis said a February 2004 letter from Brooks showed there was "absolute confidence between the two of them in relation to all the problems at their work." He said the letter appeared to have been written by Brooks in response to Coulson's attempt to end the relationship.

"You are my very best friend. I tell you everything. I confide in you, I seek your advice," Brooks wrote, according to Mr Edis. "Without our relationship in my life I am really not sure I will cope."

Mr Edis said the affair was uncovered when police searched a computer found at Brooks's home in 2011 as part of the hacking investigation.

It's not clear whether the letter was ever sent.

Brooks married soap-opera star Ross Kemp in 2002. They later divorced and she married horse trainer Charles Brooks in 2009.

Former News of the World editor and Downing Street communications chief Andy Coulson arrives in court. Rebekah Brooks and Coulson had a secret affair for six years, prosecutors said. Picture: AFP

In his opening arguments, Mr Edis said News of the World journalists, with consent from the tabloid's top editors, colluded to hack the phones of politicians, royalty, celebrities and even rival reporters in a "frenzy" to get scoops.

He said the "dog-eat-dog" environment led to routine lawbreaking that was sanctioned by those in charge of the tabloid: editors Rebekah Brooks and Coulson.

Jurors were shown email exchanges involving private investigator Glenn Mulcaire and News of the World news editor Ian Edmondson - one of the defendants - detailing the 2006 hacking of former government minister Tessa Jowell, royal family member Frederick Windsor and one-time Deputy Prime Minister John Prescott, who was the subject of a major kiss-and-tell story from a mistress.

Mulcaire also hacked the phones of two journalists at the rival Mail on Sunday tabloid who were working on their own story about the Prescott affair, the prosecutor said.

"In the frenzy to get the huge story ... that's what you do," Mr Edis said.

Mr Edis also played a recording of Mulcaire "blagging" - seeking information about a voicemail password from a service provider using a false name. He said Mulcaire - an "accomplished" blagger and hacker - made the recording himself, and also recorded some of the voicemails he hacked.

The prosecutor said the emails, the recordings and pages from Mulcaire's notebooks provided "very clear evidence" of hacking so widespread that senior editors must have known about it.

Mr Edis said Mulcaire was paid almost 100,000 pounds ($170,000) a year under a contract that started in 2001 and ended when he was arrested in 2006 for hacking the phones of royal aides. He and the tabloid's royal editor Clive Goodman were briefly jailed and for years, News International maintained that hacking had been limited only to that pair.

That claim was demolished when the Dowler case became public in 2011. News International, now known as News UK, has since paid millions in compensation to scores of people whose phones were hacked.

Rebekah Brooks, Coulson, Edmondson and former managing editor Stuart Kuttner all deny charges of phone hacking. The trial is expected to last roughly six months.

Mulcaire has pleaded guilty, along with three former News of the World news editors.

Mr Edis said there are few records of what Mulcaire was paid to do by the newspaper, but that senior editors must have known of his illicit activity.

"The question is, did nobody ever ask, 'What are we paying this chap for?'" he said. "Somebody must have decided that what he was doing was worth an awful lot of money. Who was that?"

He said Rebekah Brooks, who edited the News of the World when Mulcaire was put on retainer "was actively involved in financial management" and sent editors stern emails about keeping costs down.

Under Coulson, who succeeded her as editor, Mulcaire's fee was increased to 2019 pounds a week.

Mr Edis said there was no evidence that Mulcaire's fees were ever questioned.

"You would question it - unless you knew all about it," Mr Edis said.

News Corp is the parent company of News UK and of the publisher of this report.

A NOTE ABOUT RELEVANT ADVERTISING: We collect information about the content (including ads) you use across this site and use it to make both advertising and content more relevant to you on our network and other sites.