According to a 50-state survey by the Associated Press, Iowa was among 21 state's that had their election systems targeted by hackers last year.

The Department of Homeland Security notified the states on Friday that hackers targeted their election infrastructure ahead of the 2016 election.

"As part of our ongoing information sharing efforts, today DHS notified the Secretary of State or other chief election officer in each state of any potential targeting we were aware of in their state leading up to the 2016 election," DHS spokesman Scott McConnell said. "We will continue to keep this information confidential and defer to each state whether it wishes to make it public or not."

In the majority of those states the activity mostly included activity like scanning and observing, a DHS official said. However some states experienced unsuccessful attempts to compromise networks. A small number of networks were compromised, but none that involved the tallying of votes.

U.S. Sen. Mark Warner praised the government's notification to the 21 states but said it should have come sooner. The Virginia Democrat says it's unacceptable that it took almost a year after the presidential election to notify states their elections systems were targeted.

A spokesperson for the Nebraska Secretary of State's office confirms that Nebraska was not among those states targeted by hackers.

Laura Strimple said the Department of Homeland Security contacted their office Friday but only to share that Nebraska's system had not been among those targeted.