A Taliban attack Tuesday at the gates of the Afghan presidential palace cast an ominous light on the course of a war that Washington remains committed to ending.

A week after NATO forces handed all security operations to the Afghans, local forces fought off the attackers on their own, killing all eight militants without calling in any coalition help. But the assault also made clear that the Taliban’s fighting spirit remains unbroken and demonstrated their ability to bluff their way past two checkpoints and storm a highly fortified zone of the capital.

The firefight took place in Ariana square, about 500 yards and several more checkpoints away from the presidential palace, where President Hamid Karzai was apparently preparing for a speech later in the morning.

The attack could complicate American efforts to try to get Karzai’s government to sit down with the Taliban to talk peace. U.S. President Barack Obama later talked with Karzai in a video conference that lasted more than an hour and covered issues including the peace process and the newly opened Taliban political office in the Gulf nation of Qatar, Karzai’s office said without giving further details.

The Taliban have said they would continue fighting even as they pursued peace talks, and the attack served to drive that home, said Moeen Marastial, a political analyst and former member of the Afghan parliament.

“The main point is the Taliban wants to show to the government of Afghanistan and to the world and to the powers who are working for the peace process that they are in power,” Marastial said. “They can come close to the palace, they can come close to the places where NATO is, where American forces are — they wanted to show to the world that ‘we can do it.’ “

The gunbattle started about 6:30 a.m. near the east gate leading to the palace next to the Afghan Ministry of Defense and the former Ariana Hotel, which former U.S. intelligence officials have confirmed is used by the CIA. One carload of Taliban fighters dressed in military-style camouflage uniforms emerged from their black Land Cruiser and started shooting. Another got stuck between two checkpoints and detonated their explosives-laden vehicle.

The Taliban said all eight of its fighters died in the attack, while the Interior Ministry said three security guards were killed and another wounded.

Taliban spokesman Zabiullah Mujahid claimed responsibility, saying in an emailed statement that “eight of our suicide bombers were able to reach the most secure area of Kabul,” identifying them by name and saying they were carrying hand grenades, a machine gun and rocket-propelled grenades.

“The brave mujahedeen, with special tactics and help from inside, were able to reach their target with their weapons and cars,” he said. He said their targets were the CIA building, the palace and the Defense Ministry and claimed “a number of foreign invaders were killed and wounded in the attack.”

Karzai reacted sharply, saying that the Taliban cannot on one hand open an office for peace in Qatar and on the other hand kill people in Afghanistan.

“The enemies of the people of Afghanistan once again proved with their failed attack that they are against peace, stability and progress in Afghanistan,” he said.

The Taliban have refused to negotiate with Karzai’s government in the past, saying the U.S. holds effective control in Afghanistan, but the Americans are hoping to bring the two sides together. Long-stalled negotiations have become more urgent with Afghan presidential elections and the withdrawal of most U.S. and other foreign combat troops looming in 2014.