Appeal court judges have overturned a decision not to jail a man caught trafficking cocaine worth £2.4 million.
Graham Curran has been sent to prison for three years after his previous sentence of 225 hour unpaid work was branded "inexplicable".
The 35-year-old admitted earlier this year being concerned in the supply of the Class A drug and given the community payback order.
But the Crown challenged the sentence at the Court of Criminal Appeal in Edinburgh and judges quashed the original sentence and replaced it with a jail term.
Lord Justice Clerk, Lady Dorrian, said Curran would have faced a "significantly longer" prison sentence but for an issue of comparative justice that arose because of sentencing in an associated case.
Hearing the appeal with Lord Matthews and Lord Boyd of Duncansby, she said they considered the original sentence chosen by the judge who dealt with Curran to be "inexplicable".
She said that Curran was "a knowing courier" who had willingly engaged in crime for gain with very significant amounts of drugs involved.
Curran, of Conisborough Road, Easterhouse, was seen taking part in the handover of the illegal haul to an associate in Paisley.
Allan Ferguson was seen parking a Transit van in Foxbar Crescent, in Paisley, before Curran arrived by car and handed over bags to him.
Police recovered a total of 20 kilos of cocaine, which was up to 54 per cent pure, and recovered cash and drug equipment after Ferguson was stopped and a search at his home in Clydebank, was carried out.
He was later jailed for four years after admitting cocaine supply and possession of a stun gun.
Advocate depute Alex Prentice QC told the appeal court that in Curran's case it was "well beyond the custody threshold".
He said: "It is not a case in which a community based disposal was appropriate."
The prosecutor said that Curran was playing an important role in the overall supply chain in the illicit drugs trade.
"The respondent (Curran) was participating in an operation which resulted in the transportation of a significant quantity of drugs - some 20 kilograms," he said.
Mr Prentice said: "This is a case where someone went in with his eyes open and knew what he was doing."
He said: "The Crown invites the court to conclude that the sentence was unduly lenient."
He agreed that the Crown did not seek to appeal against the sentence imposed on Ferguson when questioned by the Lord Justice Clerk.
Solicitor advocate Iain Paterson, for Curran, asked the appeal judges to refuse the Crown challenge and said the sentencing judge, Lady Scott, had appropriately followed the process and outlined the reasons for her decision.
He said Curran's involvement was at a low level and he was not aware of the type of drugs involved.
Mr Paterson said: "In this instance the respondent's position was he was doing a favour for a friend."
He added that Curran was a father-of-four who had shown a willingness to undergo supervision to address his offending behaviour.
The defence lawyer said that Curran was in full-time employment, but was in debt at the time of the offence.
"At the end of the day there are occasions when custody is inevitable for drugs cases. There are cases, even involving quite large quantities such as this, where it is not," said Mr Paterson.