The Defence Secretary Phillip Hammond has confirmed that the UK is holding up to 90 Afghans in Camp Bastion.
British lawyers, representing some of the men, said the detainees had been held for up to 14 months without charge.
"The UK could have trained the Afghan authorities to detain people lawfully with proper standards and making sure that they are treated humanely," Phil Shiner, of Public Interest Lawyers, told the BBC.
"They could have then monitored that, including with ad hoc inspections, to make sure that the Afghans were obeying the law. They have chosen not to do so."
Afghan officials have called for the immediate transfer of the men.
"The prisoners must be handed over to the Afghan authorities," General Zahir Azimi, a spokesman for the Afghan Ministry of Defence, said.
"After their handover to us, they will be dealt with according to our judicial laws, and the agreements reached with the international community."