A legal charity has named two men who ended up in the infamous "dark prison" at Bagram in Afghanistan after being handed to US forces by members of the SAS. The men were held in Afghanistan after being seized by the British in Iraq.

The charity Reprieve said it was suing the Ministry of Defence for refusing officially to identify the men, who are from Pakistan. The MoD argues that if it released their names, even to their families, it would be in breach of the Data Protection Act.

The director of Reprieve, Clive Stafford Smith, accused the ministry of "rank hypocrisy" for refusing to give the prisoners their rights while at the same time claiming it was upholding the rule of law.

David Davis, the former Conservative shadow home secretary, who has also taken up the case, described the ministry's refusal to release the names as an "insult". "If they are bad people, tell us who they are. I think the reason we are not being told is because it is politically embarrassing. They deserve a trial. We deserve to know what the truth is."

Reprieve said it had taken years and thousands of pounds to discover the identities of the two men who were taken by the SAS in Iraq in 2004. It named them today as Amanatullah Ali, a Shia, and Yunus Rahmatullah, a Sunni.

It said Rahmatullah, who is also known as Saleh, is being held in the mental health wing of Bagram and has been unable to contact his family or a lawyer and was in a "legal black hole".

The British legal aid system will not allow his family to bring a case because there is insufficient proof Saleh was the prisoner rendered to Afghanistan, though only the British government had proof, Reprieve said.

The charity released a statement from Rahmatullah's mother, Fatima, in which she said: "As a mother, this is a position that I struggle to understand. My plea to the British government is simple: tell me whether you picked my son Yunus up and gave him to the Americans."

John Hutton, the defence secretary at the time, admitted to the Commons a year ago that British officials knew about the transfer of the prisoners in 2004, although the government had previously denied having any knowledge of the case. He said they were members of Lashkar-e-Taiba, (LeT) a banned organisation that he said was linked to al-Qaida.

The US had assured him that the men were being held in humane conditions and had access to the Red Cross. Hutton added that the US had taken the prisoners to Afghanistan because of a "lack of relevant linguists necessary to interrogate them effectively in Iraq".

In a letter to Jack Straw, the justice secretary, released today, Stafford Smith says on a recent visit to Pakistan that he received evidence that Amanatullah, a rice farmer, could not be a member of LeT, a Sunni extremist group.

In his statement last year, Hutton referred to allegations first made in 2008 by Ben Griffin, a former SAS soldier, that British troops had handed over to the US detainees who were then rendered to Iraq. The MoD subsequently obtained a gagging order preventing Griffin from saying anything further.

Davis said he would be surprised if an incoming Conservative government did not set up an immediate inquiry into this case and others where Britain is alleged to have been involved in the secret rendering by the US of detainees to prison where they were likely to be tortured.

The MoD had threatened it would seek to impose costs if Reprieve took legal action against it, a move designed to intimidate, said Stafford Smith. "The government may think that bully-boy tactics will intimidate us. In truth, they merely steel our resolve," he said.

An MoD spokesman described the two men as "insurgents captured in Baghdad as they posed an imperative threat to security of the Iraqi people and our armed forces".

He added: "Reprieve were seeking an assurance that the MoD would not pursue them for costs if they lost, but were clear that no reciprocal assurance would be provided. The MoD has therefore declined to give them this assurance."