Afghan President Hamid Karzai signed off Wedneday on the establishment of a Taliban office in Qatar so that the militant group can hold talks with the United States.

Karzai expressed hope in a statement that peace talks between the dueling sides would “eliminate the foreigner’s excuses” to use Afghanistan as battlefield against terrorist groups.

“Dialogue is the only way to achieve peace and get rid of war and the violence imposed upon suffering Afghan people,” the statement said.

Karzai’s approval of an office for the militant group in Doha was seen as vital to the prospects of the peace talks, for which the Obama administration has expressed high hopes. In the past, the Afghan president has felt slighted during U.S.-led attempts to hold exploratory talks with Taliban envoys.

The Taliban on Tuesday for the first time publicly expressed interest in negotiating with Washington, outlining a vision for talks with U.S. officials in Qatar that conspicuously excluded a role for the Afghan government.

The announcement marked a major departure for a militant group that had long said it would not negotiate while foreign troops remained in Afghanistan. It offered a measure of hope that after years of missteps, a U.S.-sought negotiated settlement to the decade-long war is possible. If a Taliban office is established in Qatar, U.S. and Afghan interlocutors would have a formal venue to hold substantive talks with the group’s envoys after months of clandestine contact.

But analysts warned of substantial unknowns and possible pitfalls, including whether Pakistan will back or seek to thwart the effort. In addition, it was feared that the statement’s omission of a role for the Afghan government would anger Karzai, a fear that was at least in part allayed by Wednesday’s presidential statement.

One Taliban motivation for negotiating with Washington involves brokering the release of Taliban leaders detained in the prison facility at Guantanamo Bay, Cuba. An Afghan official suggested Tuesday that the Taliban might use a captured U.S. soldier, Sgt. Bowe Bergdahl, as a bargaining chip.

Analysts say Taliban leaders have also expressed hope that the United States could bring them out of diplomatic isolation by lobbying to have the group’s leaders removed from international terrorist sanctions lists.

The Obama administration has long sought a political breakthrough in a costly war that has lasted more than a decade and is increasingly unpopular. But U.S. officials acknowledge that any peace deal with the Taliban — which would probably allow the group back into Kabul through some sort of power-sharing arrangement — would be fraught with challenges and moral dilemmas.

An Afghan role?

The Taliban statement’s omission of Karzai and his government puts the Obama administration in a difficult position. Even as they have held a half-dozen meetings with insurgent representatives outside Afghanistan over the past year, U.S. officials have continued to insist that “formal” talks would have to be led by the Afghans.

State Department spokeswoman Victoria Nuland sidestepped questions about the U.S. role in any forthcoming talks in Qatar. “If this is part of an Afghan-led, Afghan-supported process, and the Afghan government itself believes it can play a constructive role . . . then we will play a role in that, as well,” she said.

Karzai’s spokesman did not return calls seeking comment on Tuesday. When Karzai asked the Taliban to lay down its arms and return to the political fold in the summer of 2010, he referred to insurgent leaders as wayward “brothers” who would be welcomed back.

But when his top peace broker, former president Burhanuddin Rabbani, was assassinated in a suicide bombing in the fall, Karzai rescinded his offer to talk. He said instead that he would henceforth talk only to Pakistani officials, because the Taliban’s leaders have long operated out of havens across the border. At times, aides say, he has felt blindsided by clandestine talks that U.S. officials have held with the Taliban.

The Taliban statement said there were “two main parties involved” in Afghanistan over the past decade: the “Islamic Emirate of Afghanistan” — the insurgents’ name for the country — and “the United States of America and its foreign allies.”

The statement also said that the group’s vision for the Qatar office was to promote its own political views and “to spread understanding with the international community.” U.S. officials have said the Taliban representatives were told that the office could not be used for recruitment or political activities.

Some Afghan officials expressed concern Tuesday about the prospect of negotiations.

“This is being planned based on the politics of the United States,” said parliament member Fauzia Kofi, who is regarded as pro-American. “History is repeating itself. This may result in bringing the Taliban back to power. None of our achievements have been systematic, and they can all collapse at any time.”

Arsallah Rahmani, a member of the government-appointed Afghan peace council who was a deputy minister when the Taliban governed Afghanistan, said talks with the Americans are worth a try.

Rahmani said the Taliban envoys who are expected to operate out of the Qatar office include Tayyab Agha, the former personal secretary of Taliban leader Mohammad Omar, and Obaidullah Akhund, who served as defense minister in the Taliban government. Agha, who speaks English fluently, took part in several earlier sessions with U.S. officials. Rahmani said Agha, Akhund and at least three other Taliban envoys have moved to Qatar with their families in recent days.

“These are people who are not involved in the fighting,” Rahmani said.

A key question is how Pakistan would react to talks. Afghan and U.S. officials have accused Pakistan’s military and dominant spy agency of playing a spoiler role in the Afghanistan war.

“Without Pakistan’s cooperation, we will not achieve anything,” Rahmani said.

Pakistan’s Foreign Ministry spokesman, Abdul Basit, said in a text message that his government supports an “Afghan-led and Afghan-owned reconciliation process.” He did not elaborate.

The Taliban governed Afghanistan from 1996 until 2001, a period when al-Qaeda used the country as a staging ground for attacks on the United States. The Taliban government was toppled months after the Sept. 11 attacks, but it regrouped as an insurgency that straddles the border with Pakistan. Taliban leaders say they seek to rule Afghanistan again as an Islamic state free of corruption and subjugation by the West.

Informal contacts

Although the United States has long said that the war must end with a political solution, informal talks did not begin until the administration altered its demands for the Taliban to sever all ties with al-Qaeda, renounce violence and pledge allegiance to the Afghan constitution. In a February speech, Secretary of State Hillary Rodham Clinton said those conditions would need to be met at the end of negotiations, not at the beginning.

Even as the informal contacts between U.S. officials and Taliban representatives were underway, U.S. military resistance to substantive negotiations, and Karzai’s mercurial attitude toward them, contributed to a failure to move ahead.

Still, in late November, the administration reached a tentative agreement with the Taliban under which five Afghans detained at Guantanamo Bay would have been transferred to house arrest in Qatar, where an office would be opened, in exchange for the militant group’s public renunciation of international terrorism.

The deal collapsed after Karzai rejected the terms, U.S. officials said, and the Afghan president recalled his ambassador in Qatar for consultations early last month. But he reversed his stance under apparent pressure from the administration and said last week that he would accept the Qatar plan. It was unclear whether the prisoner transfer was still under discussion.

Mohammad Akhbar Agha, the former head of Jaish al-Muslimeen, a Taliban-affiliated group, said the Taliban’s interest in opening an office in Qatar’s capital, Doha, could signal that leaders are tired of fighting after years of heavy losses.

“The experience has shown us that fighting is not the only solution,” he said.

He said Karzai’s response to the overture could make or break the talks.

“Right now the talks are only with the U.S.,” he said. “I hope the Taliban will accept talking to the Afghans as well. God forbid, if these peace talks fail, the people won’t trust the government.”

Special correspondents Javed Hamdard in Kabul and Shaiq Hussain in Islamabad and staff writers David Nakamura and Karen DeYoung in Washington contributed to this report.