It is "only a matter of time" before man-made artificial intelligence becomes smart enough to learn how to take down the internet, claims Elon Musk.

The Tesla and SpaceX chief executive has raised concerns about artificial intelligence (AI) before, despite Tesla cars using the technology to partially drive themselves on public roads and learn how to improve their skills every day.

Musk tweeted the warning in response to an article by the Economist, which claims that recent attacks on the internet "could be a prelude to far worse ones".

The article begins with a quote from noted cyber-security expert Bruce Schneier: "Someone is learning how to take down the internet". Musk retweeted the article and added: "Only a matter of time before advanced AI is used to do this. Internet is particularly susceptible to a gradient descent algorithm."

The article comes in the wake of a distributed denial of service (DDoS) attack which took down hundreds of websites and online services, including Netflix, PayPal and Twitter, for several hours on 21 October.

DDoS attacks are becoming increasingly common, and easier and cheaper to orchestrate. In simple terms, they use a network of computers to bombard a single website (or in this case, the hosting company providing services to many) with traffic. This overwhelms the servers, knocking them and the websites they host offline.

Sometimes the attacks are personal, such as one on 20 September which took down the blog of US cyber-security journalist Brian Krebs. However, although the attack only targeted one person and their website, its size made it one of the largest ever; traffic hitting Krebs' servers was equal to almost half a percent of the internet's entire capacity, the Economist claims.

The article also suggests DDoS attacks could occur around 8 November, the day of the US presidential election, and while this will not disrupt voting systems, which are not connected to the internet, it could affect government and media websites.

Musk's fears of AI are well documented. In August 2014 the South African billionaire warned that technology is "potentially more dangerous than nukes". He added: "Hope we're not just the biological boot loader for digital super-intelligence. Unfortunately, that is increasingly probable."

In October 2014, Musk said developing AI could become like "summoning the demon" and creating humanity's "biggest existential threat".