Indonesia, like many Asian countries, is very strict on drug crimes, and most of the more than 40 foreigners on its death row were convicted of drug charges.
Sandiford's lawyer said she would appeal, a process that can take several years. Condemned criminals face a firing squad in Indonesia, which has not carried out an execution since 2008, when 10 people were put to death.
A verdict is expected in the trial of Sandiford's alleged accomplice, Briton Julian Anthony Pounder, next Tuesday. He is accused of receiving the drugs in Bali, which has a busy bar and nightclub scene where party drugs such as cocaine and Ecstasy are bought and sold between foreigners. Two other British citizens and an Indian have already been convicted and sentenced to prison in connection with the bust.
The British embassy said in a statement that it was in contact with London to discuss the next step in providing legal assistance to Sandiford. It said the United Kingdom "remains strongly opposed to the death penalty in all circumstances."
Martin Horwood, a member of Parliament representing Sandiford's Cheltenham constituency in western England, called the sentence a shock and said he would raise the case with Foreign Secretary William Hague.
"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," Horwood told the BBC.
Harriet McCulloch of human rights charity Reprieve, which is assisting Sandiford, urged the British government to support her appeal.
"Lindsay has always maintained that she only agreed to carry the package to Bali after receiving threats against the lives of her family," McCulloch said. "She is clearly not a drug kingpin — she has no money to pay for a lawyer, for the travel costs of defense witnesses or even for essentials like food and water."
In its verdict, a panel of Denpasar District Court judges concluded that Sandiford had damaged the image of Bali as a tourism destination and weakened the government's drug prevention program.
"We found no reason to lighten her sentence," said Amser Simanjuntak, who headed the judicial panel.
Prosecutors had been seeking a 15-year prison sentence for Sandiford, who was arrested in May when customs officers at Bali's airport discovered 3.8 kilograms (8.4 pounds) of cocaine in the lining of her luggage.
State prosecutor Lie Putra Setiawan told reporters that the verdict was "appropriate," explaining that prosecutors had been demanding 15 years because of Sandiford's age.
Indonesia has 114 prisoners on death row, according to a March 2012 study by Australia's Lowy Institute for International Policy. Five foreigners have been executed since 1998, all for drug crimes, according to the institute.
President Susilo Bambang Yudhoyono has granted clemency to four drug offenders on death row since he took office in 2004.
The most publicized recent case internationally is that of Schapelle Corby, an Australian convicted of smuggling marijuana in 2005. Her 20-year sentence was reduced last year and she is now eligible for parole, but she remains imprisoned.