The federal government on Friday told election officials in 21 states that hackers targeted their systems last year, although in most cases the systems were not breached.

The government told The Associated Press last year that more than 20 states were targeted by hackers believed to be Russian agents before the 2016 elections. But for many states, the calls Friday from the Department of Homeland Security were the first official confirmation of whether their states were on the list.

The AP contacted every state election office on Friday. While not all of them responded immediately, those that said they were targeted were Alabama, Arizona, Colorado, Connecticut, Illinois, Iowa, Maryland, Minnesota, Ohio, Oklahoma, Pennsylvania, Virginia, Washington and Wisconsin.

The government did not say who was behind the hacking attempts or provide details about what had been sought. But election officials in three states said Friday the attempts could be linked to Russia.

The Wisconsin Election Commission, for example, said the state’s systems were targeted by “Russian government cyber actors.”

MORE: How Russia hacked American faith in the democratic process

Federal officials said that in most of the 21 states, the targeting was preparatory activity such as scanning computer systems. The targets included voter registration systems but not vote tallying software. Officials said there were some attempts to compromise networks but most were unsuccessful.

Only Illinois reported that hackers had succeeded in breaching its voter systems.

Colorado said the hacking wasn’t quite a breach.

“It’s really reconnaissance by a bad guy to try and figure out how we would break into your computer,” said Trevor Timmons, a spokesman for the Colorado secretary of state’s office. “It’s not an attack. I wouldn’t call it a probe. It’s not a breach, it’s not a penetration.”

Virginia U.S. Sen. Mark Warner is praising the federal government’s notification but says it should have come sooner.

The Democrat says it’s unacceptable it took almost a year after the presidential election to notify states their elections systems were targeted. He says he’s relieved the Department of Homeland Security is finally informing the top elections officials in all 21 affected states “that Russian hackers tried to breach their systems in the run up to the 2016 election.”

The disclosure to the states comes as a special counsel probes whether there was any coordination during the 2016 presidential campaign between Russia and associates of Donald Trump.

Trump, a Republican who defeated Democrat Hillary Clinton in the presidential election, has called the Russia story a hoax. He says Russian President Vladimir Putin “vehemently denied” the conclusions of American intelligence agencies.