Image copyright PA Image caption Tony Blair advised Rebekah Brooks six days before her arrest over phone hacking, a court has heard

Tony Blair gave advice to newspaper executive Rebekah Brooks on handling the phone-hacking scandal six days before her arrest, a court has heard.

The court heard Mrs Brooks spoke to the former prime minister and passed on what he had said to James Murdoch, then News International executive chairman.

In an email, she said Mr Blair had said he was "available" to her, James and Rupert Murdoch as an "unofficial adviser", the Old Bailey heard.

Mrs Brooks denies any wrongdoing.

In the email, Mrs Brooks said Mr Blair had urged her to set up a "Hutton style" inquiry - a reference to the inquiry into the death of government weapons adviser Dr David Kelly.

She said Mr Blair's offer of further advice "needs to be between us".

The Hutton report exonerated Mr Blair and other officials over claims they exaggerated the threat posed by weapons of mass destruction in Iraq in a dossier of evidence.

Mrs Brooks sent the email on Monday 11 July 2011 - the day after the final edition of the News of the World had been published.

She resigned as News International's chief executive the following Friday, and was arrested on Sunday.

During the email exchange, she told Mr Murdoch there was no indication that the News of the World had suffered from a sales boycott on its final weekend.

'Tough up'

Her email read: "I had an hour on the phone to Tony Blair.

"He said:

"1. Form an independent unit that has an outside junior counsel, Ken Macdonald [former director of public prosecutions], a great and good type, a serious forensic criminal barrister, internal counsel, proper fact checkers etc in it. Get them to investigate me and others and publish a Hutton-style report.

Who are the defendants? Image copyright Various agencies Read profiles of the defendants

"2. Publish part one of the report at same time as the police closes its inquiry and clear you and accept shortcomings and new solutions and process and part two when any trials are over.

"3. Keep strong and definitely sleeping pills. Need to have clear heads and remember no rash short-term solutions as they only give you long-term headaches.

"4. It will pass. Tough up.

"5. He is available for you, KRM [Rupert Murdoch] and me as an unofficial adviser but needs to be between us. He is sending more notes later."

Mr Blair's office issued a statement later, saying: "This was Mr Blair simply giving informal advice over the phone.

"He made it absolutely clear to Ms Brooks that, though he knew nothing personally about the facts of the case, in a situation as serious as this it was essential to have a fully transparent and independent process to get to the bottom of what had happened.

"That inquiry should be led by credible people, get all the facts out there and that if anything wrong were found there should be immediate action taken and the changes to the organisation made so that they could not happen again."

The defence case for Mrs Brooks is expected to start later this week.

She denies conspiracy to hack voicemails, conspiracy to make corrupt payments to public officials and conspiracy to pervert the course of justice.

Mrs Brooks is one of seven defendants in the phone-hacking trial. They all deny the various charges.