Afghanistan President Hamid Karzai is now willing to join peace talks with the Taliban, his spokesman says, a day after rejecting the negotiations over the way the militant group opened an office in Qatar.

The Doha office will be used for peace talks between U.S. and Taliban representatives, followed by talks between the Taliban and Afghanistan’s High Peace Council.

Karzai says he will join talks with the Taliban -- provided that the Taliban flag and nameplate with their former regime's name -- the "Islamic Emirate of Afghanistan" -- are removed from the office. Karzai also wants a formal letter from the United States supporting the Afghan government.

As of Thursday, the nameplate was replaced by one that read "Political office of the Taliban." The switch was ordered by Qatar, according to U.S. State Department spokeswoman Jen Psaki.

Karzai spokesman Fayeq Wahidi said U.S. Secretary of State John Kerry promised Karzai during phone conversations Tuesday and Wednesday that the Taliban's flag and nameplate would be removed.

Once those commitments are met, Wahidi said, "We would see no problem in entering into talks with the Taliban in Qatar."

But the flagpole inside the compound has been apparently shortened and the Taliban flag -- dark Koranic script on a white background -- is still flying but not visible from the street.

Taliban spokesman Shaheen Suhail also said Thursday that the Taliban has ruled out exclusive talks with the High Peace Council. Instead, the Taliban would talk to all Afghan groups, he said.

"After we finish the phase of talking to the Americans, then we would start the internal phase ... that would include all Afghans," he said. "Having all groups involved will guarantee peace and stability."

Suhail said the Taliban are insistent that they want their first interlocutors to be the United States. "First we talk to the Americans about those issues concerning the Americans and us (because) for those issues implementation is only in the hands of the Americans," he said.

"We want foreign troops to be pulled out of Afghanistan," he added. "If there are troops in Afghanistan then there will be a continuation of the war."

Suhail indicated the Taliban could approve of American trainers and advisers for the Afghan troops, saying that "of course, there is cooperation between countries in other things. We need that cooperation."

He said that once the Taliban concluded talks with the United States, they would participate in all-inclusive Afghan talks.

President Obama told reporters during a visit to Berlin Wednesday that "ultimately we're going to need to see Afghans talking to Afghans."

Obama added that the U.S. knew that mistrust was rampant between the Taliban and the Afghan government and had expected "there were going to be some areas of friction, to put it mildly, in getting this thing off the ground.

At the office's opening ceremony Tuesday, the Taliban welcomed dialogue with Washington but said their fighters would not stop fighting. Hours later, the group claimed responsibility for a rocket attack on Bagram Air Base outside the Afghan capital, Kabul, that killed four American service members.

Karzai was apparently angered Wednesday by the way Kabul had been sidelined in the U.S.-Taliban bid for rapprochement and denounced Taliban violence.

Before reversing his stance, he said on Wednesday that his High Peace Council would "neither attend nor participate in the talks" until the process is "completely" in the hands of Afghans, according to a statement from his office.

Karzai on Wednesday also suspended negotiations with the United States on a bilateral security agreement that would cover American troops who will remain behind after the final withdrawal of NATO combat troops at the end of 2014.

In his eight years as president, Karzai has often had rocky relations with his U.S. allies and has upset the Americans by questioning their motives. In June 2011, for example, he likened the Americans to occupiers, saying they were not in Afghanistan to help Afghans but "for their own purposes, for their own goals."

Some of Karzai's anti-American rhetoric in the past has appeared aimed at gaining political favor at home and staving off accusations he is a U.S. puppet, but in this case he does not appear to be posturing, said Martine van Bijlert, an analyst with the Afghanistan Analyst Network.

The Taliban ceremony also upstaged Tuesday's formal handover of all security operations in Afghanistan from U.S.-led forces to the Afghan army and police.

The Associated Press contributed to this report.