A Muslim man detained by police at an airport on his way home from Hajj, the holy journey to Mecca, has won a significant legal battle over the UK's anti-terror laws.
The High Court declared that Abdelrazag Elosta was unlawfully refused access to a solicitor before he was detained and questioned under Schedule 7 of the Terrorism Act 2000.
A judge ruled that Mr Elosta had undergone "45 minutes of unlawful questioning".
Allowing Mr Elosta's application for judicial review, Mr Justice Bean said: "The examining officers had no power to question the claimant after he had requested the presence of a solicitor and prior to the solicitor's arrival."
Government lawyers had been due to appeal against the ruling, but today it was announced that the appeal had been withdrawn.
Anne McMurdie, of Birmingham-based firm Public Law Solicitors, who represented Mr Elosta, said: " We are delighted with the outcome of the case.
"This is a very important judgment confirming the existence of vital procedural safeguards for travellers in ports and airports detained and compelled to answer questions in circumstances where refusal to answer may result in criminal conviction.
"We are pleased that the Government has had second thoughts and has taken action to amend the statute to make sure these rights are clearly spelled out, instead of continuing its fight through the courts to deny people at port and airports access to legal advice."
Mr Elosta arrived at Heathrow airport on November 10 2012 in an organised group and was stopped by Metropolitan Police officers for examination under Schedule 7.
Mr Justice Bean, sitting at London's High Court, said the examining officers (EOs) began to question Mr Elosta and he provided his name, address, phone number and passport details.
But he asked to speak to his solicitor in Birmingham before answering further questions.
An EO phoned the solicitor at 4.30pm and told her the questioning was likely to last 30-40 minutes.
The EO said Mr Elosta had "a right to consult a solicitor in private" - but the examination would not be delayed pending her arrival.
The judge said Mr Elosta was permitted to speak to his solicitor on the phone, but not in private, as officers remained in the room and could hear what he said, though probably not what the solicitor said.
The Commissioner of the Metropolitan Police now accepted that it was "inappropriate" for the EOs to have heard what was said and apologised.
Mr Elosta's solicitor told the EOs she would arrange for a London solicitor to go to the airport, but another officer came to the phone and repeated that the police would not wait for that solicitor's arrival before starting questioning.
The officer said they would continue the examination at 5.30pm and would arrest Mr Elosta if he refused to answer any question.
Mr Elosta's solicitor called back at 5.26pm and asked for a delay until the London solicitor could attend, but the request was refused and the warning about not answering questions repeated.
The questioning began at 5.45pm and ended shortly before 6.30pm and Mr Elosta was permitted to leave.
Ms McMurdie said the Government has now made late changes in the House of Lords to the Anti-Social Behaviour, Crime and Policing Bill 2013-14 to reflect the Elosta ruling by setting out expressly rights to legal advice.
She said the Bill also reduces the time of maximum examination under detention from nine to six hours and provides that if questioning continues beyond one hour a person must be formally detained "and thus will have right to legal representation from that point".