Grandmother from Redcar was arrested in May after Bali police said they found £1.6m-worth of cocaine in her suitcase

A British woman has been sentenced to death after attempting to smuggle £1.6m-worth of cocaine into Bali.

Lindsay Sandiford, a 56-year-old grandmother, originally from Redcar in Teesside, was arrested for drug trafficking in May last year after local police said they found almost 5kg of cocaine in the lining of her suitcase.

There were gasps of surprise in Denpasar district court as the sentence was handed down; the prosecution had sought a 15-year prison term, not the death penalty, but the judge ruled that Sandiford's attempted crime had damaged Bali's image.

Sandiford wept as judges handed down the sentence, covering her face with a scarf as she left the courtroom to return to prison. She earlier told the court she was forced into taking the drugs into the country by gangsters who were threatening to hurt one of her children, saying "the lives of my children were in danger".

Sandiford is now expected to appeal within the next 14 days. If all legal avenues are exhausted she could ask the president for clemency. President Susilo Bambang Yudhoyono has granted clemency to four drug offenders on death row since taking office in 2004.

A spokeswoman for the Foreign Office said: "We can confirm that a British national is facing the death penalty in Indonesia. We remain in close contact with that national and continue to provide consular assistance. The UK remains opposed to the death penalty in all circumstances."

Delivering the sentence, a panel headed by Judge Amser Simanjuntak said Sandiford had damaged the image of Bali as a tourist destination and weakened the government's anti-drug programme. "We found no reason to lighten her sentence," he said.

In her witness statement earlier in the trial, Sandiford expressed regret for her actions. "I would like to begin by apologising to the Republic of Indonesia and the Indonesian people for my involvement. I would never have become involved in something like this but the lives of my children were in danger and I felt I had to protect them," she said.

During the trial, her lawyer read out a statement from her son that said: "I love my mother very much and have a very close relationship with her. I know that she would do anything to protect me. I cannot imagine what I would do if she was sentenced to death in relation to these charges."

Reprieve, a legal action charity, said Sandiford was a vulnerable target for drugs traffickers, pointing to an expert report from Dr Jennifer Fleetwood that was put before the court. Fleetwood concluded that Sandiford's vulnerability would have made her an ideal target for drugs traffickers, noting that: "There is … evidence to suggest that a trafficker would seek someone who was vulnerable. Having reviewed extracts from Lindsay's medical records I know that Lindsay has a history of mental health issues … This may have unfortunately made her an attractive target for threats, manipulation and coercion."

Harriet McCulloch, an investigator at Reprieve, said Sandiford maintained that she only agreed to carry the package to Bali after receiving threats against the lives of her family. "She is clearly not a drug kingpin – she has no money to pay for a lawyer, for the travel costs of defence witnesses or even for essentials like food and water," she said. "She has co-operated fully with the Indonesian authorities but has been sentenced to death while the gang operating in the UK, Thailand and Indonesia remain free to target other vulnerable people."

Martin Horwood, Liberal Democrat MP for Cheltenham, in Gloucestershire, where Sandiford lived previously, said the sentence came as a shock, as Indonesian prosecutors had not sought it.

"The days of the death penalty ought to be past. This is not the way that a country that now values democracy and human rights should really be behaving," he told BBC News. "When the prosecutors asked for something less than the death sentence, for a custodial sentence, then I guess I'm afraid some of us perhaps relaxed a little and this has come as a real shock that the judges have actually delivered a sentence which is obviously much, much harsher than the one that was actually requested by prosecutors."

Three other Britons were alleged to be involved in the same plot to smuggle drugs into Bali. Julian Ponder faces being executed by firing squad if found guilty of playing a role in the smuggling scheme when his verdict is given on Wednesday. He is accused of receiving the drugs in Bali, but claimed he was trapped.

His lawyers said he was told Sandiford was delivering a present for his child's birthday and, when he met her to receive the gift, police officers arrested him. His partner, Rachel Dougall, 38, from Brighton, received a one-year jail sentence in the Denpasar district court last month. She had already been in jail for eight months awaiting trial and could be reunited with her daughter by April.

Property developer Paul Beales, a long-time Bali resident, was also spared a harsh sentence when judges gave him four years for possession of a small amount of hashish.

Indonesia has one of the strictest drug policies in the world, with about 40 foreigners on death row convicted of drug crimes, according to a March 2012 report by Australia's Lowy Institute for International Policy.

Five foreigners have been executed since 1998, all for drug crimes, according to the institute. There have been no executions in the country since 2008, when 10 people were put to death.