Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

LONDON — A senior British lawmaker has blasted messaging platforms like WhatsApp for using end-to-end encryption, which stops security services monitoring messages.

It comes as it emerges the London terror attacker Khalid Masood used the messaging service moments before he killed an American tourist, a police officer and two others outside the U.K. Parliament.

British Home Secretary Amber Rudd told the BBC it was “completely unacceptable” for messaging services to encrypt communication.

"We need to make sure that organizations like WhatsApp, and there are plenty of others like that, don't provide a secret place for terrorists to communicate with each other," she said.

Get breaking news and insider analysis on the rapidly changing world of media and technology right to your inbox. This site is protected by recaptcha

Rudd also urged technology firms to do a better job preventing the publication of material that promotes extremism.

Police have said they are currently investigating the London attacker's path to radicalization and whether he was in contact with other terrorists before the assault.

It follows an ongoing battle between technology giant Apple and the FBI in the U.S. over access to locked devices.

The dispute broke out after Apple refused to help the FBI unlock the phone of San Bernadino mass shooter Syed Farook.

The government eventually used a software tool costing $1 million to get into Farook’s phone.

Apple has consistently said it would be wrong for them to allow the government to access iPhones so they could decrypt data.

In a letter to customers published last February, Apple CEO Tim Cook said “the implications of the government’s demands are chilling.”

He wrote: “If the government can use the All Writs Act to make it easier to unlock your iPhone, it would have the power to reach into anyone's device to capture their data."

Acting Commissioner of the Metropolitan Police Craig Mackey, Amber Rudd and Mayor of London Sadiq Khan applaud during a candlelit vigil at Trafalgar Square. Carl Court / Getty Images

The U.N. human rights chief said U.S. authorities “risk unlocking a Pandora’s Box” in their efforts to force Apple to create software to crack the security on its phones.

Zeid Raad al-Hussein warned last year about the potential for "extremely damaging implications" on human rights, journalists, whistle-blowers, political dissidents and others.

He said the case is "potentially a gift to authoritarian regimes" and criminal hackers.