Voting systems in 21 states were targeted by hackers, government agency says Only a handful of election systems were actually breached.

 -- Election officials in 21 U.S. states were notified Friday by government officials that hackers had targeted their systems ahead of the 2016 presidential election.

The list includes Florida, Ohio, Pennsylvania, Virginia and Wisconsin, Alabama, Alaska, Arizona, California, Colorado, Connecticut, Delaware, Illinois, Iowa, Maryland, Minnesota, North Dakota, Oklahoma, Oregon, Texas and Washington, according to The Associated Press.

Election officials were informed about a year after the U.S. Department of Homeland Security (DHS) first announced states were targets of hacking efforts possibly connected to Russia. However, election systems in only a handful of states, including Illinois, were actually breached.

"It is completely unacceptable that it has taken DHS over a year to inform our office of Russian scanning of our systems, despite our repeated requests for information," California Secretary of State Alex Padilla, a Democrat, said in a statement to The Associated Press. "The practice of withholding critical information from elections officials is a detriment to the security of our elections and our democracy."

Being a target of hacking attempts doesn't mean sensitive voter data was manipulated or election results were changed. A hacker targeting a computer system without getting inside is akin to a burglar circling a home, checking for any unlocked doors and windows, according to the AP.

Federal officials said the targeting in most of the 21 states was just preliminary activity, such as voter registration systems. Officials said there were attempts to compromise networks in some states but most were not successful, the AP reported.

DHS acknowledged that state and local officials should be kept in the know about cybersecurity threats to election systems.

"We are working with them to refine our processes for sharing this information while protecting the integrity of investigations and the confidentiality of system owners," the department said in a statement obtained by The Associated Press.

The government did not say who was behind the hacking efforts or provide details about what had been sought. But election officials in several states told the AP the attempts were linked to Russia.

For instance, the Wisconsin Election Commission said its systems were targeted by "Russian government cyber actors." And Alaska Elections Division Director Josie Bahnke said computers in Russia were scanning the state's election systems searching for vulnerabilities.

Sen. Mark Warner, D-Va., vice chairman of the Senate Select Committee on Intelligence, said in a statement Friday that it was "unacceptable" that DHS officials waited to notify states about the targeting.

"While I understand that DHS detects thousands of attempted cyberattacks daily, I expect the top election officials of each state to be made aware of all such attempted intrusions, successful or not, so that they can strengthen their defenses -- just as any homeowner would expect the alarm company to inform them of all break-in attempts, even if the burglar doesn't actually get inside the house," he said.

This disclosure comes as a special counsel investigates whether associates of President Trump could have colluded with Russia during the 2016 presidential campaign.

Trump, a Republican who defeated Democratic rival Hillary Clinton in the Nov. 8 vote, has called the Russia story a "hoax." He said Russian President Vladimir Putin "vehemently denied" the American intelligence community's conclusion that Russia was behind the massive alleged hacking of political organizations and individuals during the U.S. presidential race.