New Delhi: Government websites, including those of defence and home ministries, have not come under any cyberattack, but suffered a hardware-related glitch, National Cyber Security Coordinator Gulshan Rai said on Friday.

Explaining the outage, he said the websites have been down since afternoon after it was noticed that there was a "storage area networking system" failure. "The same is being addressed. It is only a hardware failure," Rai, who has been working in the field of cyber security since 1998, said.

"There is no hacking or cyberattack," Rai, who heads the cyber security unit, said.

Rai, who was earlier heading the computer emergency response team, said that nearly a dozen government websites hosted by National Infomatics Centre, including defence, home, department of law and labour, were affected due to the outage.

"The hardware is being replaced and they will be up very soon," Rai said.

Earlier Defence Minister Nirmala Sitharaman had tweeted, "Action is initiated after the hacking of MoD website (http://mod.nic.in). The website shall be restored shortly. Needless to say, every possible step required to prevent any such eventuality in the future will be taken."

The website of the home ministry was temporarily taken down as part of extra precautions.

An official spokesperson of the Ministry of Home Affairs said the National Informatics Centre, which hosts the MHA site, is upgrading the security system of the website which has led to its temporary suspension.

"The requested service is temporarily unavailable. Sorry for Inconvenience. It would be available soon," the message read on the MHA website.