The Guardian via AFP-Getty Images file A still frame grab recorded on June 6, 2013, and released to AFP on June 10, 2013, shows Edward Snowden, who has been working at the National Security Agency for the past four years, speaking during an interview with The Guardian newspaper at an undisclosed location in Hong Kong.

British authorities revealed Friday that NSA leaker Edward Snowden took at least three times as many highly sensitive documents as previously reported, and possibly far more.

At a court hearing in London the government told a judge that David Miranda, the partner of Guardian journalist Glenn Greenwald, was carrying 58,000 documents related to British intelligence on electronic devices when he was stopped and searched at Heathrow airport on August 18. The government also said it believed the documents had been “stolen” from Government Communications Headquarters (GCHQ), the British counterpart of the NSA.

Greenwald, who has been helping Snowden disseminate the documents he took from U.S. government computers, had previously said that Snowden had downloaded 20,000 documents. As previously reported by NBC News, the U.S. government has not yet been able to determine the scope of what Snowden took.

In a signed statement revealed at Friday’s hearing, a detective superintendent with the Counter-Terrorism branch of the Metropolitan Police said that the material on an “external hard drive” seized from him “discloses approximately 58,000 UK documents of the highest level of classification.”

The government was able to decrypt some of the files using a code found on a piece of paper carried by Miranda, but is struggling to decrypt the rest.

“So far only 75 documents have been reconstructed” into a legible format, said the statement. “This represents only a tiny fraction of what was seized.”

Marcelo Piu / AFP - Getty Images file David Miranda, left, -- the Brazilian partner of Glenn Greenwald, right, a U.S. journalist with Britain's Guardian newspaper who worked with intelligence leaker Edward Snowden to expose U.S. mass surveillance programs -- is pictured at Rio de Janeiro's Tom Jobim international airport on Aug. 19.

The statement, dated Tuesday, said that the drive contains approximately 60 gigabytes of data, of which only 20 gigabytes have been so far been “accessed.”

“The remainder is encrypted,” said the statement, using a form of encryption known as True Crypt, “which renders the material extremely difficult to access. … [O]fficers are working with experts from other agencies to try and obtain access to that material.”

In a separate statement to the court, Oliver Robbins, Britain's deputy national security advisor for intelligence, chided Miranda for carrying a password on a piece of paper. "The fact that ... claimant was carrying on his person a handwritten piece of paper containing the password for one of the encrypted files," said Robbins, "is a sign of very poor information security practice."

Robbins also said that the information seized from Miranda was "highly likely to describe techniques which have been crucial in life-saving counter-terrorist operations, and other intelligence activities vital to UK national security."

A former U.S. official familiar with the case said "significant amounts" of intelligence documents from U.S. allies -- particularly the UK and Australia -- were taken by Snowden from the NSA.

Miranda had challenged the right of British authorities to retain the material seized from him, but at Friday’s hearing the judge agreed to let the government continue examining the files. Scotland Yard has launched a criminal investigation of Miranda.

Miranda’s lawyers said they considered it a partial victory that the judge said the government has seven days to establish there is a threat to national security.

British authorities detained Miranda when he stopped in Heathrow while traveling from Berlin back to Rio de Janeiro, where he and Greenwald live. Miranda had been in Berlin visiting filmmaker Laura Poitras, who has been working with Greenwald to publicize Snowden’s leaked documents. Miranda was delivering documents to Poitras and retrieving documents for Greenwald, according to Greenwald.

Miranda was detained and questioned for eight hours under Section 7 of the U.K.’s Terrorism Act. British authorities seized multiple electronic devices from Miranda.

Alexander Smith contributing reporting to this story. Matthew Cole is an investigative reporter at NBC News. He can be reached at matthew.cole@nbcuni.com. Robert Windrem is an investigative reporter at NBC News. He can be reached at robert.windrem@nbcuni.com.

More from NBC News Investigations:

Follow NBC News Investigations on Twitter and Facebook