Samina Malik became the first woman convicted under new terrorism legislation after writing poems entitled How To Behead and The Living Martyrs.

Malik, described as an "unlikely but committed" Islamic extremist, was last month convicted by an jury at the Old Bailey of a charge under the 2000 Terrorism Act.

She worked at WH Smith at Heathrow, where she scribbled her extremist lyrics on till receipts. On one she wrote: "The desire within me increases every day to go for martyrdom."

But Malik told the jury she only adopted her "lyrical terrorist" nickname because she thought it was "cool" and insisted: "I am not a terrorist."

Malik had tears in her eyes as she left the dock, while her mother wept during the court hearing. The judge said Malik's crime was on the "margins" of the offence of which she was found guilty. He said Malik was of "good character" and from a "supportive and law-abiding family who are appalled by the trouble that you are in".

"The Terrorism Act and the restrictions it imposes on the personal freedom exist to protect this country, its interests here and abroad, its citizens, and those who visit here. Its protection embraces us all. Its restrictions apply to us all, whatever our personal religious or political beliefs."

He told Malik that if she had been convicted of the more serious charge of possessing an article for terrorist purposes - of which the jury cleared her - she would have faced a jail term. But he said, while a custodial sentence was merited, she had already faced "extremely rigorous" bail conditions which were "tantamount to house arrest".

The court heard that she also spent five months in custody after being arrested in October last year. Malik's sentence was suspended for 18 months, with the condition that she be supervised for the whole period and undertake unpaid work.

Outside court Malik's solicitor Iqbal Ahmed read out a statement on her behalf. He said: "The trial process has been a terrible ordeal for her and she is now relieved that it is all over. The jury found that she did not have the material for terrorist purposes which was an important part of her case. She now wants to get on with her life."

Last month, Malik was found guilty of possessing records likely to be useful in terrorism by a majority of 10 to one. She cried as the verdict was read. Two female jurors were also in tears. The court heard that Malik stocked a "library" of material useful to terrorists at her family home in Southall, west London.

The court was told Malik was 20 years old when she "first started to consider Islam" and was "like most teenagers, somewhat rebellious". Malik had been interested in poetry, and had written love poems, followed by rap poems and later by "what can only be described as the distasteful poetry which has been mentioned in this trial".

John Burton, defending, said: "She became hooked on Abu Hamza-type addresses and that affected her mindset." The jury was told that she joined an extremist organisation called Jihad Way, set up explicitly to spread terrorist propaganda and support for al Qaida.

Jonathan Sharp, prosecuting, told the court she visited a website linked to the jailed cleric Abu Hamza and stored material about weapons. The court also heard Malik belonged to a social networking website called hi5, describing her interests as "helping the mujaheddin in any way which I can".

Under favourite TV shows, she listed: "Watching videos by my Muslim brothers in Iraq, yep the beheading ones, watching video messages by Osama bin Laden and Ayman al-Zawahri and other videos which show massacres of the kaffirs." removed

After her conviction, Judge Peter Beaumont, the recorder of London, told her: "You have been, in many respects, a complete enigma to me."

A spokesman for the Muslim Council of Britain welcomed the decision by the judge to suspend the sentence. Inayat Bunglawala said: "It always seemed a rather bizarre decision to prosecute Samina when she is clearly not an actual terror plotter.

"Samina Malik was being prosecuted in effect for a thought crime because she had downloaded some material from the internet which anyone could download." Mr Bunglawala said the case demonstrated how ill-conceived and "incredibly broad-ranging" the law is under Section 58 of the Terrorism Act. "Teenagers download some quite nihilistic material every day and they are not prosecuted," he said.

"The fact that this case went to court sends a very worrying signal that if you are Muslim and you are downloading from the Internet you may be judged to a quite different standard from others. Fortunately the judge has been sensible about this. The wider Muslim community must be relieved that she hasn't got a custodial sentence."

In a statement, the Crown Prosecution Service said: "Samina Malik was not prosecuted for writing poetry. Ms Malik was convicted of collecting information, without reasonable excuse, of a kind likely to be useful to a person committing or preparing an act of terrorism."