It said the 1982 Aviation Security Act gave it the power to implement measures for the safety and protection of the travelling public.

"We do not believe that Ryanair have any legal grounds," said a spokesman for the Department of Transport.

"We continue to face a serious security threat and we will not compromise security."

But Ryanair plans to use provisions within a separate law - the 2000 Transport Act - to seek compensation for losses incurred between 10 and 16 August.

Chaotic scenes

After details of the alleged bomb plot emerged, the government banned passengers from taking any hand luggage onto flights leaving the UK.

The measures led to chaotic scenes at Heathrow and other leading UK airports as hundreds of flights were cancelled and thousands of passengers experienced long delays.

Ryanair says the security measures have cost it millions

Restrictions were eased slightly several days later but the measures have been fiercely criticised by Ryanair, BA and other carriers.

BA has said it is considering seeking compensation from airports operator BAA for failing to handle airport security efficiently during the emergency.

The security clampdown has been particularly problematic for Ryanair because it prefers to put as little luggage into plane holds as possible to ensure a quick turnaround of flights and thus maintain lower prices.

It has called for larger briefcases to be allowed as hand luggage and for the current policy of searching every second passenger passing through X-ray security to be relaxed.

The carrier has also claimed it is "nonsensical" to reduce hand luggage on outbound flights but not on inbound services.