PHOENIX — The Arizona secretary of state’s website repeatedly froze and crashed during the Tuesday primary, renewing criticism of the office over its struggles in running state elections.

The website crash prevented the public from easily accessing primary election results and led to a host of comments blasting the office on Twitter.

The new site was touted by Secretary of State Michele Reagan as a replacement for a glitch-prone website that also led to reporting delays in the 2012 and 2014 election cycles.

Reagan spokesman Matt Roberts said early Tuesday evening that the office was prepared and had backup plans in place for the new system.

A chagrined Roberts said late Tuesday that “we’re not completely sure as to what’s causing some of the slowness in the reporting.”

“We are showing accurate results — certainly not at the rate we want to,” he said.

On Wednesday afternoon, the office announced it had tracked down the cause. The office said in a blog post a locked file that created a database backup prevented new information from being processed and distributed. Once the problem was tracked down, staff altered the agency’s database processing to avoid the problem.

The blog post says the file was not part of the public site and wasn’t as rigorously tested as needed. The Arizona Republic reported the file contained updated results that were sent to media outlets.

The website issues surfaced five months after people waited for hours to cast ballots in the Phoenix area during the presidential primary. Reagan was blamed for not foreseeing problems with the county’s plan to drastically cut the number of polling sites.

The specter of Arizona’s past voting problems was visible in other areas Tuesday as well.

The top election official in metro Phoenix was struggling to keep her job after taking blame for the long lines in the presidential primary.

Maricopa County Recorder Helen Purcell was in an extremely tight race with business owner and political newcomer Aaron Flannery in the Republican primary. There are still thousands of votes that need to be tallied.

Purcell slashed the number of polling places under the mistaken belief that people would vote by mail. But the unsettled nature of the presidential race meant that many people opted to cast ballots in person.

She is a longtime fixture in Maricopa County Republican politics, first getting elected as recorder in 1988. Flannery won the endorsement of the Arizona Republic editorial board, which ripped Purcell over voting problems.

The new reporting website crashed for the first time shortly after early results were posted around 8 p.m. Tuesday. It continued to intermittently produce results throughout the night, occasionally producing messages saying “Error” or “This site can’t be reached” or “Service unavailable.”

Reagan said in the weeks leading up to the election that the website had been upgraded to a system that would get results quicker. The results would be posted in real time, and users wouldn’t have to refresh the page for updates and new numbers.

It also would be more robust than the previous system and cost less, she said.

The problems arose one day after the FBI warned state officials to boost their election security after hackers targeted data systems in two states. Arizona’s voter registration system was shut down on June 28 over what the FBI described as a “critical threat” and was brought back online July 7 with new security features.

Federal officials are becoming increasingly concerned about the possibility that hackers, particularly those working for Russia or another country, could breach U.S. elections systems and wreak havoc on the November presidential election.