Image copyright AFP Image caption Cyber attacks from groups like Anonymous pose a greater threat than terrorism, Congress was told

US intelligence agencies have placed cyber attacks from foreign governments and criminals at the top of their list of threats to the country.

Online assaults would increasingly undermine US economic competitiveness and national security, said Director of National Intelligence James Clapper.

A report issued by his office said Russia's military was setting up a cyber command to carry out attacks.

The report also describes China, Iran and North Korea as leading threats.

In testimony to a congressional committee on Thursday, Mr Clapper said he no longer believed the US faced "cyber Armageddon".

The idea that major infrastructure such as financial networks or power grids could be disabled by hackers now looked less probable, he said.

However he warned: "We foresee an ongoing series of low-to-moderate level cyber attacks from a variety of sources over time, which will impose cumulative costs on US economic competitiveness and national security."

Mr Clapper highlighted the case of Russia, which he said posed the greatest a cyber risk to US interests. He said that threat from the Russian government was "more severe" than previously realised.

He also said profit-minded criminals and ideologically driven hackers were also increasingly active.

Image copyright AP Image caption Director of National Intelligence James Clapper said moderate attacks were the biggest threat

Image copyright AFP Image caption Hollywood film "The Interview" was embroiled in the fallout of a hack attack last year

Over the past year there have been a series of high-profile cyber attacks against US targets.

North Korea was accused of being behind the theft of a huge data cache from Sony Pictures in November.

Mr Clapper also mentioned the example of an alleged Iranian attack on the Las Vegas Sands Casino Corporation last year.

Meanwhile in January the Twitter and YouTube accounts of the US military command were hacked by a group claiming to back Islamic State (IS).

During the hearing, Mr Clapper acknowledged that the US had its own "offensive capabilities".

In 2010 Iran experienced a cyber attack on its nuclear program. Tehran accused Israel and the US of planting malware.