Disabled prisoner Daniel Roque Hall, who requires round-the-clock treatment, was told he would not have to go back to jail today.
Mr Hall, 30, had been serving a three-year sentence at Wormwood Scrubs in west London after admitting smuggling 2.5kg of cocaine in his wheelchair back from a holiday in Peru.
He suffers from the rare degenerative condition Friedreich's ataxia and is not expected to live into his forties. He has spent most of his sentence in hospital.
Allowing his appeal against sentence, Court of Appeal judges Lord Justice Hughes, Mr Justice Wyn Williams and Mr Justice Hickinbottom substituted the lesser term of 18 months, which means he can return to his north-west London home this week.
Lord Justice Hughes said there was no lack of punishment in what he had undergone since being sentenced last summer, and his case was "an appropriate case for an exceptional application of mercy."
Foreign Minister Alistair Burt's admission that the Cameron government has "supported" a survey of attitudes to US drone strikes in Pakistan's tribal areas amounts to a tacit admission of British involvement.