Afghan President Hamid Karzai will travel to Qatar within days to discuss peace negotiations with the Taliban, the Afghan foreign ministry said yesterday, as efforts intensify to find a negotiated solution to the 12-year war.

Karzai’s trip to Qatar would represent the first time the Afghan president has discussed the Taliban peace process in Qatar, and comes after years of stalled discussions with the US, Pakistan and the Taliban.

The announcement was made only hours after another thorny issue in the US-Afghan relationship - the transfer to Afghan control of the last group of prisoners at the Bagram military complex held by US forces - appeared to be resolved. The Pentagon announced on Saturday that a deal had been clinched.

Karzai’s Qatar trip was announced by foreign ministry spokesman Janan Mosazai.

“President Karzai will discuss the peace process and the opening of a (Taliban) office for the purposes of conducting negotiations with Afghanistan,” he said.

Karzai was expected to travel to Qatar within a week, a senior Afghan official told Reuters.

The US has said it would support setting up an office in Doha where peace talks between the Taliban and Afghanistan could take place.

“We welcome and fully support President Karzai’s visit to Qatar as a sign of improved relations between the two US allies,” said Caitlin Hayden, a spokeswoman for the White House National Security Council. “The president and other world leaders continue to call on the Afghan armed opposition to join a political process.”

The announcement comes several weeks after Karzai delivered a fiery speech during the first visit to Afghanistan by new US Defence Secretary Chuck Hagel, in which he accused Washington of holding peace talks with the Taliban without him.

Karzai also accused the Taliban of colluding with America to keep foreign troops in the country, marking a fresh low point in the relationship between the Afghan president and his most powerful backer.

Mosazai confirmed the agreement reached on the transfer of detainees held at the military detention facility at Bagram in Parwan province north of Kabul.

The issue of detainees at Bagram had become another stress point in Karzai’s relations with Washington. A ceremony formally transferring the last prisoners to Afghan custody collapsed two weeks ago after Karzai rejected part of the deal.

American forces control an area of the prison adjacent to the Bagram military complex, which holds several dozen Taliban fighters considered by the US to pose the most severe threat.

Washington is concerned the Afghans may release some of these men when control of the prison is handed over.

That concern was reinforced during Karzai’s outburst this month, in which he said the US had been dragging its heels on prisoner transfers and said he would release those detainees that were “innocent”.

Under the terms of agreement, all Afghans detained by forces of the US-led coalition would now have to be handed over to Afghan control within 96 hours of capture, Mosazai said. Any decision to release them after that would be made only by the Afghan government.

The US last year agreed to hand over responsibility for most of the more than 3,000 detainees at the prison to Afghanistan and held a transfer ceremony in September.