Hamid Karzai, the Afghan president, is scheduled to travel to Qatar within days in order to hold preliminary peace negotiations with the Taliban, the Afghan foreign ministry says.

"President Karzai will discuss the peace process and the opening of a [Taliban] office for the purposes of conducting negotiations with Afghanistan" - Janan Mosazai,

Afghan foreign ministry spokesperson

Karzai's trip, announced on Sunday, would be the first time that the Afghan head of state has travelled to Qatar to discuss the peace process, and comes after years of stalled discussions between Afghanistan, the United States, 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 on Saturday.

Karzai's Qatar trip was announced by Janan Mosazai, the spokesperson at the Afghan foreign ministry.

"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 speaking on condition of anonymity told the Reuters news agency.

The US has said it would support setting up an office in the Gulf state 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 spokesperson 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."

Tensions high

Sunday's announcement came several weeks after Karzai delivered a fiery speech during the first visit to Afghanistan by Chuck Hagel, the US defence secretary. In that speech, Karazi accused Washington of holding talks with the Taliban behind the Afghan government's back.

Mosazai also confirmed on Sunday 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.