Experts at Citizen Lab worked with security company Lookout and discovered that the link would have installed a program taking advantage of three flaws that Apple and the others were not aware of. They published their findings on Aug 25.

It was "the most sophisticated spyware package we have seen in the market," said Mr Mike Murray, a researcher with Lookout.

The researchers said they had alerted Apple a week and a half ago, and the company developed a fix and distributed it as an automatic update to iPhone 6 owners.

The next day, the latest update, iOS 9.3.5, was launched.

Apple spokesman Fred Sainz confirmed that the company had issued the patch after being contacted by researchers.

"We advise all of our customers to always download the latest version of iOS to protect themselves against potential security exploits," said Apple.