LIMA, Peru - A British drug mule convicted in Peru for trying to smuggle cocaine hidden in bags of mayonnaise was expelled from the South American country following her release from prison.

Melissa Reid of Scotland was preparing to board an Amsterdam-bound flight Tuesday night in Lima's international airport. She and an Irish-born Michaella McCollum pleaded guilty in 2013 of trying to smuggle onto an airplane about 12 kilograms of cocaine worth almost $1 million.

Reid was jubilant when she arrived at Lima's airport accompanied by her father and representatives of the British embassy. But her smiles quickly turned to frowns of concern as she was hounded by camera-wielding journalists and had to scurry through a checkpoint pulled by airport security.

The 22-year-old was released under a Peruvian law allowing first-time drug offenders to walk free for good behaviour after completing a third of their sentence. McCollum was paroled in April and remains in Peru.

Reid "served her time in prison according to the law and can now go to her country, free, to the streets," said Janeth Sanchez, a spokeswoman for Peru's prison system.

Their case and conditions of confinement attracted widespread attention in the United Kingdom. About 90 per cent of the 1,809 foreigners in Peru's prisons are either sentenced or awaiting trials for drug trafficking.