Hangzhou Xiongmai Technology said millions of web-connected cameras and digital recorders became compromised because customers failed to change their default passwords.

The hack has heightened long-standing fears among security experts that the rising number of interconnected home gadgets, appliances and even cars represents a cyber security nightmare.

The added convenience of being able to control home electronics via the web also leaves them more vulnerable to malicious intruders, experts say.

Unidentified hackers seized control of gadgets including Xiongmai's on Friday and directed them to launch an attack that temporarily disrupted access to a host of sites, which also included Amazon and Spotify, according to US web security researchers.

The "distributed denial-of-service" attack targeted servers run by Dyn Inc, an internet company located in Manchester, New Hampshire in the US.

These types of attacks work by overwhelming targeted computers with junk data so that legitimate traffic cannot get through.

"The issue with the consumer-connected device is that there is nearly no firewall between devices and the public internet," said Tracy Tsai, an analyst at Gartner, adding that many consumers leave the default setting on devices for ease of use without knowing the dangers.

Researchers at the New York-based cyber security firm Flashpoint said most of the junk traffic heaped on Dyn came from internet-connected cameras and video-recording devices that had components made by Xiongmai.

These components had little security protection, so devices they went into became easy to exploit.

In an acknowledgement of its products' role in the hack, Xiongmai said it would recall products sold in the US before April 2015 to demonstrate "social responsibility".

It said products sold after that date had been patched and no longer constitute a danger.

Liu Yuexin, Xiongmai's marketing director, said Xiongmai and other companies across the home surveillance equipment industry were made aware of the vulnerability in April 2015.

Mr Liu said Xiongmai moved quickly to plug the gaps and should not be singled out for criticism.

"We don't know why there is a spear squarely pointed at our chest," he added.

The company, which also makes dashboard cameras and computer chips, said it would recall more than four million web-connected cameras and has offered customers a software security fix.

The recall will apply only to devices sold under Xiongmai's name. As an original equipment manufacturer, close to 95% of the company's products are sold by other firms which repackage its devices under their own brand names, Mr Liu said.

Xiongmai and Dahua, a video surveillance manufacturer also based in the eastern Chinese tech hub of Hangzhou, first came under scrutiny several weeks ago after Flashpoint assessed that hackers had controlled their devices to attack the website of cyber security writer Brian Krebs, among other targets.

Dahua has responded by saying it is dedicated to testing vulnerabilities, and has offered discounts for replacement equipment.

Xiongmai has adopted a less conciliatory stance. It downplayed its culpability this week, saying that as even the world's largest technology companies experience security lapses, "we are not afraid to also experience it once".

Xiongmai also slammed "completely untrue, malicious and defamatory" reports about its products and appended to its statement a letter from its lawyers threatening litigation.