WASHINGTON (AP) — The hacking of U.S. election systems, including by foreign adversaries, is inevitable and the real question is how the country responds, Trump administration 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 favor by hacking Democrats and spreading disinformation online, and FBI Director Chris Wray said in April that last November's midterm election was a "dress rehearsal for the big show in 2020."

Adam Hickey, a senior official in the Justice Department's national security division, told a House Oversight and Reform subcommittee that hacking was "inevitable" and that the big challenge would be "how we react to it."

"We need to be focused on resilience," Hickey said. "It's how we as a people respond when there's a rumor or there's a report that there's been a breach. We need to take a breath. We need to have confidence."

He added: "If we undermine ourselves, the confidence in our systems, we will be doing our adversaries' work for them."

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.

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.