WASHINGTON -- The hacking of U.S. election systems, including by foreign adversaries, is inevitable, and the real challenge is ensuring the country is resilient enough to withstand catastrophic problems from cyber breaches, government officials said Wednesday.

The comments by representatives from the departments of Justice and Homeland Security underscored the challenges for federal and state governments in trying to ward off interference from Russia and other countries in the 2020 election. Special counsel Robert Mueller has documented a sweeping effort by Moscow to meddle in the 2016 election in Donald Trump's favour by hacking Democrats and spreading disinformation online, and FBI Director Chris Wray said in April that the government regarded last November's midterm election was "as just kind of a dress rehearsal for the big show in 2020."

Adam Hickey, a deputy assistant attorney general in the Justice Department's national security division, told a House Oversight and Reform subcommittee that hacking was "inevitable."

"Systems that are connected to the Internet, if they're targeted by a determined adversary with enough time and resources, they will be breached," Hickey said. "So, we need to be focusing on resilience."

"We need to take a breath. We need to let the states evaluate it. We need to let investigators respond, and we need to have confidence in our elected representatives and our state officials that they've got this, because they deal with contingencies ... all the time," he added. "If we undermine ourselves, the confidence in our system, we will be doing our adversaries' work for them."

Chris Krebs, head of DHS' cyber efforts, echoed the message, saying, "100 per cent security is not the objective. It's resilience of the system. So even if you do have a bad day, it's not a catastrophic day."

Officials also said they were confident that Russian hacking that targeted voter databases of two Florida counties before the 2016 election had no impact on the vote total there. An intrusion detection system is already configured in 66 of 67 counties in the state, "and the 67th is in the process of doing so right now," Krebs said. Still, some lawmakers, including Rep. Debbie Wasserman Schultz of Florida, the former chairwoman of the Democratic National Committee, said they were disappointed that the FBI had not publicly identified the two counties that were hit.

"The lack of transparency from top to bottom in this administration is stunning, and it diminishes voters' confidence in our election system," she said.

Representatives from major technology companies, including Facebook, Google and Twitter, also testified at the hearing.

"Facebook cares deeply about protecting the integrity of the democratic process," said Nathan Gleicher, the company's head of cybersecurity policy. "We don't want anyone using our tools to undermine our elections or democracy."

He said Facebook has more than 30,000 people working on safety and security across the company, three times as many as it had in 2017.