KABUL, Afghanistan — President Hamid Karzai said today that Afghanistan and the United States are engaged in peace talks with the Taliban, even as insurgents stormed a police station near the presidential palace, killing nine people.

The brazen attack in the heart of Kabul’s government district provided a sharp counterpoint to Karzai’s announcement that the U.S. and Afghan government are in talks with the Taliban, the first official confirmation of such discussions. The violence also underscored the difficulty facing any possible negotiated settlement to the decade-long war.

Three men dressed in Afghan army uniforms stormed the police station near the presidential palace and opened fire on officers, said Mohammed Honayon, a witness. The Interior Ministry said in a statement that one of the attackers detonated a suicide bomb vest outside the gates while the others rushed in and began shooting.

The crackle of gunfire echoed through the streets typically bustling with shoppers and government employees on a Saturday, the start of Afghanistan’s work week. The fighting ended by 3 p.m. when security forces shot dead the two other attackers. Three police officers, one intelligence agent and five civilians were killed in the attack, the Interior Ministry said.

Taliban spokesman Zabiullah Mujahid claimed responsibility for the attack in a text message to The Associated Press, saying the group dispatched three suicide bombers.

The assault occurred shortly after Karzai announced during a speech at the presidential palace that his government and the U.S. have begun preliminary negotiations with the Taliban aimed at ending the conflict.

“In the course of this year, there have been peace talks with the Taliban and our own countrymen,” Karzai said. “Peace talks have started with them already and it is going well. Foreign militaries, especially the United States of America, are going ahead with these negotiations.”

Karzai said some of the Taliban emissaries that have met with members of the peace council he set up were only representing themselves, while others were speaking for the broader movement. The exact nature of the contacts was not immediately clear, and further details were not available.

The U.S. Embassy in Kabul did not immediately respond to requests for comment.

Attacks in the Afghan capital have been relatively rare, although violence has increased since the May 2 killing of Osama bin Laden in a U.S. raid in Pakistan and the start of the Taliban’s annual spring offensive.

The capital is one of seven regions scheduled to be handed over to Afghan security control in late July – part of NATO’s efforts to begin transferring security responsibilities ahead of its planned 2014 withdrawal from the country. The U.S. also plans to start drawing down troops in July.

The last major attack in Kabul took place last month when a suicide bomber wearing an Afghan police uniform infiltrated the main Afghan military hospital in late May, killing six medical students. A month before that, a suicide attacker in an army uniform sneaked past security at the Afghan Defense Ministry, killing three.