KABUL, Afghanistan -- Afghanistan's president said Wednesday he will not pursue peace talks with the Taliban unless the United States steps out of the negotiations, while also insisting the militant group stop its violent attacks on the ground after it claimed responsibility for a rocket attack that killed four Americans.

Hamid Karzai's strong response and the Taliban attack deflated hopes for long-stalled talks aimed at ending nearly 12 years of war in Afghanistan, just a day after the United States and the Taliban said they would begin initial meetings in Qatar.

Karzai had said Tuesday that he would send representatives from his High Peace Council to Qatar for talks but aides said he changed his mind after objecting to the way the announcement was handled, in particular the Taliban's use of its formal name "Islamic Emirate of Afghanistan" in opening an office in Doha.

Shafiullah Nooristani, a member of the High Peace Council, told The Associated Press that the use of the name violated agreements Karzai's government had made with the U.S. and caused diplomatic issues for Afghanistan.

"The agreement was that the office should open only -- and only -- for negotiations, not as a political entity like a parallel institution to the Afghan Embassy which is already there," Nooristan said.

In an attempt at damage control, Qatar's Foreign Ministry said late Wednesday that the Taliban had violated an agreement with them to call the office the "Political Bureau of the Taliban Afghan in Doha." It was not clear from the official Qatar News Agency report, however, if the Taliban would be forced to change the name.

Karzai also suspended talks with on a new U.S.-Afghan security deal that would allow some American troops to remain in the country after the international combat mission ends in 2014 to protest the fact that his government was being left out of the initial process.

The twin statements came despite an olive branch from Barack Obama to Karzai, with the U.S. president telling reporters during a visit to Berlin that "ultimately we're going to need to see Afghans talking to Afghans."

Obama said later the U.S. had anticipated "there were going to be some areas of friction, to put it mildly, in getting this thing off the ground. That's not surprising. They've been fighting there for a long time" and mistrust is rampant. Obama said it was important to pursue a parallel track toward reconciliation even as the fighting continues, and it would up to the Afghan people whether that effort ultimately bears fruit.

Violence also cast a pall over the talks, with the Taliban claiming responsibility for a rocket attack on the Bagram Air Base that killed four American soldiers.

Taliban spokesman Zabiullah Mujahid said the insurgents fired two rockets into the base outside the Afghan capital, Kabul, late Tuesday. American officials confirmed the base had come under attack by indirect fire, a term used for mortar shells or rockets, and that four U.S. troops were killed.

Also Tuesday, five Afghan police officers were killed at a security outpost in Helmand province by five of their comrades, officials said, the latest in a string of so-called "insider attacks" that have shaken the confidence of the nascent Afghan security forces. Local official Mohammad Fahim Mosazai said the five officers had only been on the local force for three months. He blamed the killings on Taliban infiltrators, saying the gunmen escaped with the victims' weapons.

The U.S. and Taliban announced Tuesday they would begin preliminary peace talks in Qatar without the Afghan government. The expectation had been that Karzai's High Peace Council would follow up with its own talks with the Taliban a few days later but that now seems unlikely, at least in the near term.

Nooristan, however, held out hope it would still be possible.

"We are working to solve these contradictions and fix these problems and act based on the agreements we had before so the High Peace Council can go there and start the peace talks," he said.

The Taliban have for years refused to speak to the Afghan government or the Peace Council, set up by Karzai three years ago, because they considered them to be American "puppets." Taliban representatives have instead talked to American and other Western officials in Doha and other places, mostly in Europe.

Obama cautioned that the peace talks with the Taliban would be neither quick nor easy but that their opening a political office in Doha was an "important first step toward reconciliation" between the Islamic militants and the government of Afghanistan.

Following meetings with high-ranking Afghan politicians and Peace Council executive members, however, Karzai's office said they had decided not to participate at all unless their conditions were met.

"Until the peace process is completely Afghan, the High Peace Council will neither attend nor participate in the talks in Qatar," Karzai's office said in a statement.

He also said talks could not begin until the Taliban end violent attacks in Afghanistan.

"The continuation of the Taliban's message of fighting and bloodshed during the opening of this office totally contradicts the pursuit of peace," his office said.

Earlier Wednesday, Karzai said negotiations with the U.S. on what American and coalition security forces will remain in the country after 2014 have been put on hold in the wake of the announcement by the Taliban and the U.S. The deal was expected to define the future of American troops here and pave way for billions in aid to the Afghan economy. It was not immediately clear how long Karzai planned to suspend the negotiations on the agreement.

"In view of the contradiction between acts and the statements made by the United States of America in regard to the peace process, the Afghan government suspended the negotiations, currently underway in Kabul between Afghan and U.S. delegations on the bilateral security agreement," Karzai's statement said.

Karzai's deputy spokesman Fayeq Wahedi told The Associated Press that among other things, the president opposed the Taliban's use of its formal name "Islamic Emirate of Afghanistan" in opening the office -- the name it had used when it ruled Afghanistan between 1996 and 2001.

"We had already communicated that to the U.S.," he said.

In setting up the office, the Taliban said they were willing to use all legal means to end what they called the occupation of Afghanistan -- but did not say they would immediately stop fighting. They also did not specifically mention talks with Karzai or his representatives.

The NATO-led force is to be cut in half by the end of the year, and by the end of 2014 all combat troops are to leave and be replaced -- contingent on Afghan governmental approval -- by a smaller force that would be on hand for training and advising.

The U.S. has not yet said how many troops will remain in Afghanistan, but it is thought that it would be a force made up of about 9,000 Americans and 6,000 allies.

Six years ago, Afghan security forces numbered fewer than 40,000, and have grown to about 352,000 today. But questions remain if they are good enough to fight alone.