The Government has been accused of breaching the "fundamental rights" of a British grandmother sentenced to death in Indonesia for drug smuggling by refusing to pay for legal representation as she battles for her life.
Two judges at London's High Court are being asked to rule that the Foreign and Commonwealth Office's failure to arrange "an adequate lawyer" for Lindsay Sandiford, 56, from Cheltenham, Gloucestershire, is unlawful.
Sandiford, originally from Redcar, Teesside, was given the death penalty by a court in Bali last week for taking 10.6lb (4.8kg) of cocaine on to the island.
The sentence would see her shot by a firing squad.
She was accused by the court of damaging the image of Bali and received the sentence despite prosecutors only asking for a 15-year jail term.
The High Court was told that a notice of appeal was filed with Indonesian officials earlier this week and she was given a 14-day deadline to file grounds of appeal.
Aidan O'Neill QC said Sandiford was urgently in need of funding because she is currently without legal assistance and her family have exhausted all of their available resources.
Mr O'Neill said there was "no prospect" that competent counsel would be appointed to represent Sandiford on appeal without the Government providing some funding.
Sandiford would not have access to an adequate lawyer unless the Foreign and Commonwealth Office (FC0) made arrangements, or provided funds to an expert non-governmental organisation such as Reprieve, which seeks to protect the interests of prisoners worldwide.
A competent lawyer had been found in Indonesia who was willing to waive fees and act pro bono, but required "operational costs" estimated at £2,500 to be met, said Mr O'Neill.
He told Mrs Justice Gloster and Mrs Justice Nicola Davies that the FCO had unlawfully fettered its own discretion by applying a blanket ban on providing legal representation to British nationals overseas.
The refusal to assist Sandiford was a breach of Government obligations to take all reasonable steps to ensure that her "inviolable human dignity" was respected and protected.
Mr O'Neill said the Government was failing to protect her right to life - and not to face the death penalty - despite being required to do so by the European Convention on Human Rights.
There was also an obligation on the Government to ensure Sandiford had a fair trial and any penalty imposed on her was not disproportionate.
There was also a violation of the EU Charter of Fundamental Rights and a departure, without giving a good reason, from the Government's own policy strategy for the abolition of the death penalty.
This included a commitment to provide adequate legal assistance in countries which retain the death penalty, said Mr O'Neill.
FCO lawyers are arguing that it is not unlawful or irrational under UK-EU law and human rights legislation for the Foreign Secretary to refuse to fund Sandiford's appeal.
Law firm Leigh Day, which is working with Reprieve and representing Sandiford in court, is seeking a judicial review of the Government's decision not to pay.
It argues Sandiford has not been properly represented since her arrest at Bali airport in May last year, when customs officers found drugs sewn into the lining of her suitcase.
Richard Stein, partner in the human rights team at the firm, said before today's hearing: "The Government has a duty to ensure that the human rights of British citizens are protected and that those sentenced to death, or suspected of or charged with a crime for which capital punishment may be imposed, have adequate legal assistance at all stages of the proceedings.
"This judicial review will challenge the Government's refusal to fund the £2,500 in expenses it would cost for a qualified Indonesian lawyer to represent Lindsay in her appeal against execution by firing squad which will take place on the beach in Bali if the Government do not act."
The Foreign and Commonwealth Office has said that the Government does not fund legal representation for British nationals abroad, but Sandiford's case was being raised through diplomatic channels.
A spokesman said: "We strongly object to the death penalty and continue to provide consular assistance to Lindsay and her family during this difficult time."
Evidence submitted to the court by the FCO revealed that at present there are 13 British nationals who have received death sentences in foreign countries, and 51 others are potentially facing the same sentence.
Some, says the FCO, have not requested British consular assistance while others have returned to the UK and are therefore not being assisted.
Mr O'Neill said it was being suggested that FCO assistance for Sandiford would "open the floodgates" and involve all sorts of difficulties.
But the number of death sentence cases was not great, and the amount being sought to meet the costs and expenses of an Indonesian lawyer for Sandiford was not a substantial amount of money.
Martin Chamberlain, appearing for the FCO, said it would be difficult to limit a scheme of providing assistance to death sentence cases.
He suggested there would be pressure to extend it to other human rights cases where the "human dignity" of other British nationals came under threat.
Cases could include incidents where a Briton was "sentenced to 30 lashes because they are gay - or a sentence for driving a car because you are a woman".
Mr Chamberlain said: "There are jurisdictions in the world where these punishments are given."