The Metropolitan Police now says it will not take action against The Guardian to force the newspaper to reveal its sources for stories on phone hacking.
Scotland Yard has dropped its legal bid to force The Guardian newspaper to reveal information about the source of its phone hacking stories.
The Metropolitan Police said it "decided not to pursue" production orders against the broadsheet and one of its reporters after taking legal advice.
Alan Rusbridger, editor-in-chief of The Guardian, said: "We greatly welcome the Met's decision to withdraw this ill-judged order."
He added: "We would have fought this assault on public interest journalism all the way. We're happy that good sense has prevailed."
The force had said it wanted to identify evidence of "potential breaches relating to Misconduct in Public Office and the Official Secrets Act".
Among the evidence said to be sought by the police was information about how The Guardian discovered that the mobile phone of murdered teenager Milly Dowler had been hacked.
The story prompted a massive public outcry and led to the former proprietor of the now defunct News of the World, Rupert Murdoch, personally apologising to the Dowlers. The family of the schoolgirl is now set to receive a multi-million-pound payout.
Guardian reporter Amelia Hill, the newspaper's special investigations correspondent, was interviewed under caution by Scotland Yard over alleged leaks from Operation Weeting. She has broken a string of exclusives about the phone hacking inquiry.
Scotland Yard said the application for production orders had been made under the police and criminal evidence act rather than the official secrets act.
The spokesman added: "The official secrets act was only mentioned in the application in relation to possible offences in connection with the officer from Operation Weeting."
Mr Rusbridger said: "Threatening reporters with the official secrets act was a sinister new device to get round the protection of journalists' confidential sources."
03 October 2010