More than 160 signatories including Elon Musk and British MP Alex Sobel have signed a pledge never to use AI to harm people.

In total 2,400 individuals from 90 countries signed the pledge which promises neither to participate in nor support the development, manufacture, trade, or use of lethal autonomous weapons (LAWS).

"I'm excited to see AI leaders shifting from talk to action, implementing a policy that politicians have thus far failed to put into effect," said Max Tegmark, president of the Future of Life Institute (FLI) which organised the effort.

"AI has huge potential to help the world – if we stigmatise and prevent its abuse. AI weapons that autonomously decide to kill people are as disgusting and destabilizing as bioweapons, and should be dealt with in the same way."

Advocates of an international ban on LAWS worry that additional technology will make weapons easier to hack, more likely to end up on the black market, and easier for bad actors to obtain.

Toby Walsh, Scientia Professor of Artificial Intelligence at the University of New South Wales in Sydney and a key organiser of the pledge, added: "We cannot hand over the decision as to who lives and who dies to machines.

"They do not have the ethics to do so. I encourage you and your organisations to pledge to ensure that war does not become more terrible in this way."

The Future of Life Institute, which seeks to support research and initiatives to safeguard from dangerous technology, boasts an impressive scientific advisory board including actors Alan Alda, Morgan Freeman and Stephen Hawking until his death earlier this year.

To raise awareness of the issue, the institute released a video last year which imagined a future in which autonomous weapons were commonplace.

The video includes a drone attack on the White House and on a school classroom.