Apple claimed it has no ‘backdoor’ in its products and has not worked with the US National Security Agency (NSA) for its spying activities after a leaked document suggested the NSA could monitor iPhones.

A security researcher disclosed an NSA document that hinted that a system was developed to hack into and gain access to iPhones as well as monitor them.

According to the German weekly Der Spiegel, the agency used a programme called ‘DROPOUTJEEP’, which was able to capture SMS messages, access contact lists, trace a phone via data from cell towers, access voicemail as well as turn on the iPhone’s microphone and camera.

Apple said in a statement that the company has never worked with the NSA to create a backdoor in any of its products, including the iPhone.

"Additionally, we have been unaware of this alleged the NSA programme targeting our products," it said.

"We will continue to use our resources to stay ahead of malicious hackers and defend our customers from security attacks, regardless of who’s behind them."

The latest leaked document was part of a larger collection detailing ways the US agency can access equipment manufactured by Cisco, Juniper Networks, and others.

However, a New York District Judge William Pauley said in his latest ruling that surveillance activities carried out by the NSA were legal.