WhatsApp has sued Israeli surveillance firm NSO Group, accusing it of helping government spies break into the phones of roughly 1,400 users across four continents in a hacking spree targeting diplomats and senior government officials among others.

In a lawsuit filed in federal court in San Francisco on Tuesday, messaging service WhatsApp, owned by Facebook Inc, accused NSO of facilitating government hacking sprees in 20 countries – including Mexico, the United Arab Emirates and Bahrain.

In a statement, WhatsApp said 100 civil society members had been targeted, calling it “an unmistakable pattern of abuse”. NSO has denied the allegations.

“In the strongest possible terms, we dispute today’s allegations and will vigorously fight them,” NSO said in a statement.

“The sole purpose of NSO is to provide technology to licensed government intelligence and law enforcement agencies to help them fight terrorism and serious crime.”

WhatsApp said the attack exploited its video calling system in order to send malware to the mobile devices of a number of users. The malware would allow NSO’s clients – said to be governments and intelligence organisations – to secretly spy on a phone’s owner, opening their digital lives up to official scrutiny.

WhatsApp is used by some 1.5 billion people monthly and has often touted a high level of security, including end-to-end encrypted messages that cannot be deciphered by WhatsApp or other third parties.

NSO’s spyware has repeatedly been found deployed to hack journalists, lawyers, human rights activists, political dissidents and rivals.

According to a New York Times report last year, the UAE had asked NSO to hack into the phones of the Qatari emir and a Saudi prince among other political and regional rivals.

The spyware was also implicated in the gruesome killing of journalist Jamal Khashoggi, who was dismembered in the Saudi consulate in Istanbul last year.