A former Heathrow airport worker who wrote poems about beheading non-Muslims as the self-styled “lyrical terrorist” had her conviction quashed by the Court of Appeal on Tuesday.

Samina Malik, 24, was the first woman to be convicted under contentious anti-terrorism UK legislation designed to allow police and prosecutors to target suspected terrorists at an early stage.

Her conviction for possessing records likely to be useful to terrorists was overturned on Tuesday after the Crown Prosecution Service deemed it to be unsafe. Lord Phillips, the Lord Chief Justice, expressed concern that the jury in the case may have become “confused”.

The CPS confirmed it would not seek a retrial.

Ms Malik, who worked at a Heathrow branch of retailer WH Smith, was given a suspended jail sentence of nine months in December for possessing extremist books such as The Al-Qaeda Manual and The Mujahideen Poisons Handbook.

During her trial, it was revealed that she wrote on the back of one till receipt: “The desire within me increases every day to go for martyrdom.” Other poems discovered at her home included “How to Behead” and “The Living Martyrs”. Her lawyers have insisted that she had no involvement in terrorist activity and was in effect being punished for “thought crime”.

However, Sue Hemming, head of the CPS’s anti-terrorism unit, on Tuesday defended her agency’s decision to prosecute, highlighting Ms Malik’s possession of detailed military manuals.

“Ms Malik was not prosecuted for her poetry,” Ms Hemming said. “She was prosecuted for possessing documents that could provide practical assistance to terrorists.”

The overturning of the conviction follows renewed controversy over UK anti-terror policies since David Davis, the shadow home secretary, resigned last week to trigger a by-election over what he described as the “strangulation” of British civil liberties.

Copyright The Financial Times Limited 2018. All rights reserved.

Comments have not been enabled for this article.