Afghan President Hamid Karzai on Wednesday endorsed direct U.S.-Taliban talks and the establishment of a Taliban office in Qatar to facilitate negotiations.

A statement issued by Karzai’s office couched his blessing in the government’s desire to “eliminate the foreigner’s excuses for and actions to continue war and bloodshed in Afghanistan.”

The implied criticism of U.S. military forces, which Karzai has accused of killing innocents in air attacks and night raids on Afghan villages by Special Operations troops, was something “he had to issue for internal reasons,” an Obama administration official said. “We get that.”

In the past, Karzai has also complained that the United States was working behind his back in informal talks with the Taliban that began in the spring. The official, who spoke on the condition of anonymity about the sensitive relationship, said the Obama administration was prepared to ignore Karzai’s “digs” in exchange for the statement’s positive elements.

“The best way to deal with this is to pocket the good stuff and ignore the other stuff,” the official said. “He said yes, and we’re going to take yes for an answer.”

U.S. officials hope to see the Qatar office opened within the next several weeks and full-fledged negotiations established, with Afghan participation, by a NATO summit in May.

In November, U.S. and Taliban representatives agreed in principle on a deal that included the office as well as the transfer of five Afghans held at the U.S. military prison in Guantanamo Bay, Cuba, to house arrest in Qatar. The tentative deal, which also included a public Taliban denunciation of international terrorism, collapsed when Karzai refused to go along with it.

Although the office now appears set to go forward, the rest of the terms of the agreement remain uncertain. The administration official said that the prisoner transfer, which would require congressional consultation and a waiver by Defense Secretary Leon E. Panetta, has not come up for discussion again.

The five detainees were originally requested by the Taliban early last year, according to a former administration official. They are among the most prominent remaining Afghans at Guantanamo Bay, and all held senior positions before their capture, according to military documents released by the anti-secrecy group WikiLeaks.

Mohammad Fazl, a former deputy minister of defense in the Taliban government that ruled Afghanistan from 1996 to 2001, and Noorullah Nori, a former interior minister and governor, surrendered to the Northern Alliance.

They were among the first detainees to arrive at Guantanamo Bay 10 years ago this month, and both have declined legal representation or to file cases in U.S. district court challenging their detention.

The two have been implicated in the slaughter of thousands of noncombatants, principally Shiite Muslims, during Taliban rule. When asked about the killing, Fazl and Nori “did not express any regret and stated that they did what they needed to do in their struggle to establish their ideal state,” according to documents.

The three other detainees are Khairullah Khairkhwa, a former governor and a friend of Karzai; Abdul Haq Wasiq, a former Taliban intelligence official; and Muhammad Nabi, who was described in military documents as a senior Taliban official who served in multiple leadership roles.

All of the men were recommended for continued detention by the military because they were judged to be of high intelligence value and likely to return to the fight. But the military documents described four of the five, with the exception of Nabi, as “compliant and rarely hostile to the guard force.”