British forces in Afghanistan may begin handing over prisoners to the Afghan judicial system in the coming weeks, the defence minister has announced.

Philip Hammond said that around 90 prisoners had been held at Camp Bastion for up to a year because Britain was concerned that they might be mistreated in Afghan custody.

"I decided last November that we should suspend transfers because there was one particular Afghan facility that we were uncomfortable about and we were not able to get from the Afghans a cast-iron guarantee that they wouldn't transfer detainees into that facility," he told Channel 4 News on Wednesday.

"So we stopped transferring them while we sorted out an effective and safe route for accessing the Afghan judicial system, something which we have now secured and I expect to be able to go back to the court within the next few days and put our plans to the court for their approval."

Hammond's comments came after Mohammad Daud Yaar, the Afghan ambassador to the UK, told BBC Radio 4's World at One on Wednesday that "the principle of national sovereignty" meant the detainees should be surrendered to Afghan custody. He said he could promise that they would not be mistreated. Hammond had previously said that many of the detainees posed a danger to British troops.

British lawyers acting for eight of the men, some of whom they say have been held for up to 14 months without charge, have launched high court habeas corpus applications in Britain to free them, raising comparisons with the outrage over the Guantánamo Bay prison camp.

Many of the prisoners have not been able to see a lawyer after months in prison. Hammond insisted, however, that the British army was not obliged to grant detainees legal representation because they were not involved in a legal process.

"We don't operate a judicial system in Afghanistan, we operate a regime of military detention, intelligence debriefing and then handing over of detainees to the Afghan judicial system," he said.

"We are not obliged to provide lawyers to detainees that are being temporarily held following military detention." Rosa Curling, a lawyer with the firm Leigh Day, which is representing a 20-year-old prisoner with a young daughter said: "Our client has been held at Camp Bastion since August 2012. He has not been charged with any crime and has had no access to a lawyer so he can receive legal advice about his ongoing detention."

International Security Assistance Force (Isaf) rules dictate that British troops are only allowed to hold suspects for 96 hours. But in November last year, Hammond halted plans to hand suspected insurgents captured by British troops to Afghan security forces on the grounds that they risked being abused and tortured.

Phil Shiner of Public Interest Lawyers, who is acting for eight of the men, said the government had chosen not to train the Afghan authorities to treat people lawfully and humanely. "This is a secret facility that has been used to unlawfully detain or intern up to 85 Afghans that they have kept secret, that parliament doesn't know about, that courts previously, when they have interrogated issues like detention and internment in Afghanistan, have never been told about – completely off the radar," he told the BBC. "It is reminiscent of the public's awakening that there was a Guantánamo Bay. And people will be wondering if these detainees are being treated humanely and in accordance with international law."

Shiner said the prisoners had not been told what they were accused of or granted access to legal representation, except for two men who had a one-hour phone call each with a lawyer on Wednesday .

Some of the detainees had been held incommunicado with no outside contact, for up to a month, Shiner's colleague Tessa Gregory said.

"They were held in a small solitary cell, with a strip light kept on 24 hours a day," she said after speaking to two of the detainees held at Camp Bastion, the main British base in Helmand, by telephone.

The detainees said they had been subjected to "harshing" – in which an interrogator puts his face close to the prisoner, screams and makes threats – and cameras in the ceilings of their cells were permanently running. The detainees were moved into larger cells after being interrogated, Gregory said.

In response, Hammond said that many of the detainees were suspected killers of British troops or known to be involved in the preparation, facilitation or laying of improvised explosive devices and it would be wrong to put them "back on the battlefield".

"We would like nothing more than to hand these people over to the Afghan authorities so they can be handed over to the Afghan judicial system," he told the Today programme.

Yaar said he hoped that the prisoners would be transferred to the Parwan detention facility near Bagram airfield, a US-built prison that was placed under Afghan control last year.

Asked about claims that prisoners in Afghan detention were mistreated, Yaar said the issue had been investigated by experts appointed by the Afghan president, Hamid Karzai.

"What they found was that there were some occasions of torture, but the torture was not systematic. It's a war environment and people get emotional. In the process of detaining people usually some degree of violence does occur," he said.

Yaar said he did not accept that there were "countless" examples of mistreatment in Afghan jails.

"These are people who have supposedly committed some kind of a crime," he said.

"Of course they will bring all sorts of reasons and all sorts of complaints to derail the investigation and attract sympathy."

The British government says the men are being held to protect British troops and Afghan civilians, and that it will transfer them to Afghan custody as soon as they can tackle worries about torture,

"Detention operations are an important part of our force protection measures protecting British troops, our allies and partners, and the Afghan civilian population," a British embassy spokesman said in a statement.

"The threat of UK court action is currently preventing us from transferring detainees to the Afghan Authorities. As a matter of priority the UK is working with the Afghan Government to identify a safe transfer route."

Lawyers argue that while they try to find a solution, the British government is violating two of the fundamental principles of British justice – that no one should be detained indefinitely without trial, and that any suspect should have access to a lawyer.

"We have been asking for access to our client since March this year and to date, it has not been provided. The right of access to a lawyer is a fundamental and constitutional principle of our legal system. Unimpeded access to a lawyer is part of our concept of the rule of law," Curling said.

The UK is the only foreign power still jailing Afghans in their own country, after Washington in March sealed plans for the much-delayed handover of the last Afghan prisoners it still holds on Afghan soil.

The Afghan president, Hamid Karzai has long been an outspoken opponent of foreign-run jails, which he sees as a serious violation of national sovereignty, but has focused most of his attention and political firepower on getting US forces to relinquish their huge prison near Kabul and has remained relatively silent about the prisoners detained by Britain.

Curling warned that if the UK continued to hold prisoners without trial or access to a lawyer, it would undermine efforts to improve justice in Afghanistan.

"The government states that one of the objectives of its current work in Afghanistan is to establish the rule of law and build a fair justice system by the time UK forces leave in 2014. In such a context, for the UK government itself to be refusing my client and other individuals the right to access justice is wrong and unlawful."