SALT LAKE CITY (AP) — The state of Utah will use $4.1 million in federal grant money to help buy new voting equipment, replace the state's voter registration database and to train county and state officials on new voter security measures.

States around the country are moving quickly to tap their shares of the $380 million program to strengthen voting systems amid ongoing threats from Russia and others, according to a report released Tuesday by the U.S. Election Assistance Commission.

In Utah, most counties are expected to buy new voting equipment this year with help from $1.4 million from the program, according to a letter sent by Lt. Gov. Spencer Cox sent to the commission.

The last time the state bought new voting equipment for each county was 13 years ago. Officials signed a contract for new machines last year, but found many counties couldn't immediately afford to buy them, so the state will use the grant money to reimburse them for the purchases.

Nationally, about a quarter of the money will help buy new voting equipment.

States have been scrambling to guard against Russian hackers who targeted election systems in at least 21 states in 2016. There has been no indication any vote tallies were changed, but the nation's intelligence chiefs are warning about an ongoing threat of Russian interference.

Congress approved the $380 million last spring and required states to provide a 5 percent match. The largest portion of the cash will go toward improving cybersecurity.

In Utah, about $600,000 will be spent on security improvements that include training for county clerks and information technology staff. That could mean tabletop training exercises, development of incident-management plans or expert lectures, the lieutenant governor stated.

Security is one of the main reasons Utah officials are dedicating $2.3 million toward overhauling the voter-registration database.

First created in 2004, it now needs to be totally replaced for cybersecurity, data reporting and ease of use, the letter states. The state will use its required matching funds of about $206,000 for the project, which is expected to be finished by 2022.

Utah is one of 29 states using grant money to improve voter registration systems. Russian hackers breached Illinois' voter registration system in 2016, although officials have said no information was changed or deleted.