Afghan detainees captured by British forces are "clamouring" to be transferred to the Afghan authorities, a High Court judge was told, as he agreed that two could go immediately.
Last week the court imposed an injunction to prevent any of the 92 detainees currently held without charge being handed over following fears that they might suffer serious ill treatment in Afghan custody.
The injunction was issued at the request of lawyers instructed by nine detainees who are mounting a legal challenge next month to the legality of their detention .
But Sir John Thomas, president of the Queen's Bench Division of the High Court, was told that two of the nine involved in the challenge, Niahmutullah Haqim and Mohammed Ismail , were now "happy" to be transferred from British custody at Camp Bastion to the Afghan justice authorities to face further investigation and possible trial.
The judge partially lifted the blanket injunction so that both men, who are suspected of being involved in the planting of improvised explosive devices with intent to harm UK soldiers, can be transferred as soon as possible. The ban relating to the other 90 detainees remains in place for the time being.
Haqim and Ismail will be sent to the Afghan National Detention Facility within Bagram airbase in Parwan province, about 700km (450 miles) from Camp Bastion, which is monitored by US forces.
The judge heard another of the applicants, a Mr Yahyah, was also "minded to withdraw" from the court case and be transferred.
James Eadie QC, appearing for the Ministry of Defence, had applied for the injunction to be altered, saying advisers to Defence Secretary Philip Hammond considered it was now safe to carry out transfers.
He said Hammond was "very concerned" over whether the detainees' lawyers were "properly instructed" to mount their High Court application for habeas corpus, due to take place over six days from July 19.
Eadie suggested the case now seemed "on the verge of disappearing".
He said many of the detainees clamouring to be transferred had put their thumb prints on consent documents after being told in an MoD briefing at the weekend that they could agree to be moved now.
All those given the option were in favour of transfer, said Eadie.
But Martin Westgate QC, appearing for detainees who still want to bring the legal challenge, argued there was lack of evidence that the suspect insurgents had had the risks of being handed over properly explained.
He said the relatives and friends of 22 individuals had contacted a representative of solicitors firm Public Interest Lawyers (PIL) and expressed their concerns.
Westgate said it was proposed that transfers to the Parwan detention facility were to take place via the US authorities, but there was inadequate evidence that the detainees had been made aware of the risk of ill treatment or indefinite detention at the hands of the Americans or the Afghan authorities.
The judge ruled the risks "were properly explained", but ordered that the injunction must remain in place while the Defence Secretary explains the legal basis of the claim being brought at the High Court in London and the options available to detainees pending the hearing.
Defence Secretary Philip Hammond said: "I am very pleased that the High Court has now agreed to vary the injunction that prevented the transfer of detainees held by UK forces in Afghanistan.
"Terms have been agreed that will allow those detainees who have requested transfer to Afghan custody to be handed over. Once we have addressed these terms we will shortly begin to transfer these detainees to the Afghan detention facility at Parwan.
"Unfortunately, the injunction remains in place for some detainees who are still represented by human rights lawyers. We are facilitating telephone access between those UK lawyers and the small number of detainees in Afghanistan that they represent so that the detainees can confirm if they also wish to be transferred.
"We believe that all of these suspected criminals - many linked to the killing of British troops and Afghan civilians or of facilitating, planting or being involved with explosive devices - should be transferred without further delay to have their cases heard according to Afghan law."