The Department of Homeland Security (DHS) played the key role in limiting the impact to computers and networks in the U.S. from a recent cyber security attack infected hundreds of thousands of computers worldwide with ransomware, Homeland Security Secretary John Kelly said on Wednesday.

Kelly told the House Appropriations Homeland Security Subcommittee that there was a “tremendous” interagency partnership among federal agencies but that “everyone,” including the National Security Agency and FBI, deferred to his “command center.”

Homeland Security Secretary John Kelly. Photo: DHS
Homeland Security Secretary John Kelly. Photo: DHS

“We defended the country from the biggest cyber onslaught in the history and we were successful in keeping it out of our country with the exception of a tiny, tiny number of computers,” Kelly said.

The WannaCry virus, which locks up computers until users pay to regain access to their information, hit hard in China, Russia, Europe and the Middle East but barely phased computers in the U.S.

Kelly credited the partnerships with industry and government that the National Cybersecurity Communications Integration Center (NCCIC) has with thwarting the recent WannaCry attack.

Rep. Michael McCaul (R-Texas), speaking earlier in the day at a conference hosted by Defense Daily and sponsored by Battelle, said the U.S. response to WannaCry “was really an example of how things can work right.” McCaul, chairman of the House Homeland Security Committee, said the attack “started out as a bad news story and really is a good news story for the United States.”

McCaul said he received a classified briefing on the attack, which showed the vulnerabilities of Russia and China “because they got hit the worst.”

The attack hit outdated Microsoft [MSFT] operating systems but working quickly the company and authorities developed a patch to secure computers and networks still relying on these systems.

McCaul said the reason the WannaCry virus didn’t end up being a big story in the U.S. is because of the minimal impact in the U.S. He said that DHS, working with the private sector and other stakeholders got the job done.

He called the attack a “good red team exercise” for the U.S., saying the lessons learned report “was very positive.”