Gunfire and explosions reverberated through the heart of the Afghan capital Wednesday on the eve of the presidential election after three militants with AK-47s rifles and hand grenades overran a bank. Police stormed the building and killed the three insurgents, officials said.

The three-man attack came a day after militants fired rockets at the presidential palace and follows a suicide car bomb explosion in front of NATO's Kabul headquarters Saturday that killed seven, a drumbeat of attacks that would appear to signal the intent of Taliban insurgents and their militant allies to disrupt Thursday's vote.

President Hamid Karzai faces some three dozen presidential candidates at the polls, including his former foreign minister and top challenger, Abdullah Abdullah. The Islamist insurgents have threatened those who take part in the election — a crucial step in President Barack Obama's campaign to turn around the deteriorating war.

In a sign of how difficult election preparation have been, Afghanistan's chief electoral officer said that 20 percent of election materials hadn't yet been delivered to voting sites less than 24 hours before polls open at 7 a.m. Thursday. Daoud Ali Najafi said Afghan army helicopters would be used to deliver the materials to insecure and difficult-to-reach regions.

The Interior Ministry has said that about a third of Afghanistan is at high risk of militant attack. No polling stations will open in eight Afghan districts under control of militants. Preliminary results of the presidential election should be announced sometime Saturday evening, he said.

The three armed men took over a branch of the Pashtani bank early Wednesday in a section of Kabul's old city still in ruins from the country's 1990s civil war. Police surrounded the building, exchanging gunfire with the attackers. The sound of scattered gunfire and small explosions reverberated through the city for several hours.

Abdul Ghafar Sayedzada, head of Kabul's criminal investigations unit, said police eventually stormed the building and killed three "terrorists." Few civilians were in the area because government ministries and businesses were closed Wednesday in observance of Afghanistan's independence day celebration from British rule.

Taliban spokesman Zabiullah Mujahid said 20 armed suicide attackers wearing explosive vests had entered Kabul and that five of them battled police. The claim could not be confirmed, but the Taliban in recent months have unleashed several attacks involving teams of insurgents assaulting government or high-profile sites.

The latest attacks were an ominous sign that the Taliban and their militant allies are determined to disrupt Thursday's election.

U.S. Secretary of State Hillary Rodham Clinton said Tuesday that the rise in insurgent violence in Afghanistan reflected a deliberate campaign to intimidate voters. A shopkeeper near Wednesday's gunfire attack in Kabul, Abdul Jalal, said that if violence persisted into Thursday, he and his wife would not vote.

"Tomorrow we plan to go the polling center," said Jalal. "But if it was like today, we will not vote. Elections are a good thing for Afghanistan, but security is more important."

Attacks nationwide have increased in recent days from a daily average of about 32 to 48, said Brig. Gen. E. Tremblay, the spokesman for the NATO-led force. Even with the increase, Tremblay said that insurgents do not have the ability to widely disrupt voting at the country's 6,500 or so polling sites.

"When you're looking purely at statistics ... they're not going to be able to attack even 1 percent of the entire polling sites in this country," he said on Tuesday.

U.N. Secretery-General Ban Ki-moon encouraged all Afghans to vote and said that by participating in the election Afghans will help "bring fresh vigor to the country's political life, and ultimately reaffirm their commitment to contribute to the peace and prosperity of their nation."

The next president will face challenges on several fronts: the rising Taliban insurgency, internal political divisions, ethnic tensions, unemployment, the country's drug trade and corruption.

Karzai is favored to win, but if he does not get more than 50 percent of Thursday's vote he and the second-place finisher will face off in an October run-off. Polls show Abdullah in second place with around 25 percent support and Karzai's support around 45 percent.

Fearing that violence may dampen turnout, the Foreign Ministry issued a statement Tuesday asking news organizations to avoid "broadcasting any incidence of violence" between 6 a.m. and 8 p.m. on election day "to ensure the wide participation of the Afghan people." The statement did not spell out any penalties for those who do not comply.

The English version said media "are requested" to follow the guidelines. The version in the Afghan language Dari said broadcasting news or video from a "terrorist attack" was "strictly forbidden."

It was unclear how the government intended to enforce the ban. Rachel Reid, the Afghanistan researcher for Human Rights Watch, said freedom of expression was enshrined in the Afghan Constitution and that any attempt to censor the reporting would be "an unreasonable violation of press freedoms."

"Afghans have a right to know about the security threats that they face, and make their own assessments about security," Reid said.