A British couple seized by special forces in Afghanistan on suspicion of planning a terrorist attack have been released, the Ministry of Defence (MoD) has disclosed.

They were due to be extradited at the end of last week to Britain, where they faced the prospect of being held in custody or subjected to control orders.

The couple's release came after their lawyer threatened to challenge their continuing detention in the British courts. British officials indicated there was insufficient evidence against the couple to convince a UK court that there was a substantial case against them.

However, British government officials said their release, in southern Afghanistan, did not mean the end of the matter. "It's not over," said one.

The MoD said only that two individuals had been released from detention in Kandahar "in accordance with UK detention policy".

The man and the woman were seized by British special forces in the western Afghan city of Herat more than a week ago, then were transferred to what was described as a "secure facility" in Kandahar.

The operation was sensitive and potentially a legal minefield, officials made clear at the time. The two are known to British security services and may have gone to Afghanistan to contact militant groups there.

British officials said the capture of the couple was a "counter-terrorist" operation. British special forces, of which there are about 500 in Afghanistan, work closely with the security and intelligence services there.

Afghan authorities insisted that, although their troops were involved in the capture of the couple, the operation was "UK-led". British officials said on Monday that the man and woman would remain under surveillance.

They were due to be flown back to the UK, but their lawyers let it be known they would immediately seek an application for habeas corpus – in essence, for the couple to be either charged or released – in the British courts.

Clive Stafford-Smith, director of the legal charity Reprieve, wrote last week to the Foreign Office to ask for clarification of the Britons' legal position. He said: "We are extremely concerned: if they were to be transferred to Afghan custody, they would not only face the death penalty, but also would face serious torture as well."

The MoD said at the time: "All detention operations in Afghanistan carried out under the remit of the UN-mandated ISAF [International Security Assistance Force], which includes those conducted by British forces, are conducted in accordance with international law and strict policy frameworks."

Nato forces can hold suspects for up to four days before releasing them or handing them over to the Afghan authorities. However, the period can be extended.

The Foreign Office said last week: "The UK has a national policy of detaining beyond 96 hours in exceptional circumstances, in particular where it could provide information that could help protect our forces or the local population."