Russell Irvine, 32, and Helen Paterson, 33, tried to rob the Royal Mile Pharmacy in the High Street, Edinburgh, on 15 May this year. They wielded Stanley knives and threatened staff and customers, including a pregnant woman.
Police forced entry to the shop and used a stun gun to temporarily disable Irvine.
The pair pleaded guilty to abduction, assault and robbery, and a judge at the High Court in Aberdeen jailed Irvine for six years and Paterson for five years.
They will each spend a further five years on licence following their release.
The judge, Lord Doherty, told them: “This was a terrifying and prolonged ordeal for those whom you abducted and assaulted. A major police operation had to be implemented to deal with the emergency which you created.
“There is no escaping that you have each committed a very grave crime. Those who work in pharmacies must be able to carry on their work without being subjected to violence or threats of violence. Their safety and the safety of ordinary members of the public using pharmacies has to be protected.”
Irvine and Paterson entered the shop at about 6pm and stopped anyone leaving.
Staff were said to have been traumatised by the robbery attempt, during which Paterson collapsed and had to be treated in hospital.
Chief Inspector Bob Paris said: “Russell Irvine and Helen Paterson subjected the staff and patrons within the pharmacy to a terrifying ordeal which lasted a number of hours before police could bring a safe conclusion to the incident.
“Whatever the motives for their actions were, the distress and fear they caused their victims was inexcusable and the sentences handed to them today are a reflection of how seriously police and Crown Office view incidents like this.
“I sincerely hope all of those who were detained by Irvine and Paterson within the pharmacy can now put the matter firmly behind them.”
Those caught up in the stand-off included pharmacist Peter Tinkler, employees Diane Keenan and Sandra Carr, and customers Kaya McQueen, who was five months pregnant, Paula Gordon and Mahinder Singh-Landa.
Last month, Mr Tinkler, 51, described how Irvine poured isopropyl alcohol on to the floor of the pharmacy and threatened to set it ablaze if police came near.
“He was standing with a cigarette lighter ready to light it. It was obviously very frightening,” he said.
Witness Mayte Fernaudez, 27, who lives on the Royal Mile, watched as events unfolded.
Speaking at the time, she said: “I saw one man in the pharmacy lock the door. The police couldn’t get in.”
A large section of the Royal Mile was closed off, causing traffic congestion, and both fire and ambulance services were called. Dozens of shops and businesses were evacuated as negotiators tried to resolve the situation.
Professor John McNeill, the police investigations and review commissioner, ruled officers who used Tasers had acted in a “proportionate and justified” way, during the incident.