British spies enlisted the help of the US National Security Agency (NSA) to learn how to hack firewalls made by top internet security provider Juniper, according to leaked documents.

Government Communications Headquarters (GCHQ), which is the UK’s foremost electronic intelligence and surveillance agency, looked to its counterpart across the Atlantic to access the firm’s firewalls.

The revelations come as the Intercept website released a six-page document dating back to 2011 titled “Assessment of Intelligence Opportunity – Juniper.”

The document was written by an NSA employee working with GCHQ and shows the urgency with which spies sought ways to penetrate Juniper’s security products.

“The threat comes from Juniper’s investment and emphasis on being a security leader,” the document states.

It warns that signals intelligence (SIGINT) agencies could be left unable to keep up with technological advance.

“If the SIGINT community falls behind, it might take years to regain a Juniper firewall or router access capability if Juniper continues to rapidly increase their security.”

The document was one of thousands leaked by NSA contractor-turned-whistleblower Edward Snowden.

It also notes that while Juniper was not a market leader, the firm’s products were of particular importance because they were used by countries such as Pakistan, Yemen and China – targets of US and British intelligence.

GCHQ says it does not comment on intelligence matters and operates within a strict legal framework.

In a statement, Juniper told the Intercept it “operates with the highest of ethical standards.”