In Ms Ahmed's case, it is the first time the court has ruled against Malta for violation of Article Three of the European Convention on Human Rights - prohibition of inhuman or degrading treatment - concerning migrant detention conditions.

The judges criticised conditions at Lyster Barracks - the holding centre - where migrants were exposed to cold, a lack of female staff, lack of access to open air, denial of exercise for long periods and poor food.

Slow bureaucracy

Ms Ahmed entered Malta illegally by boat in February 2009, and in May that year her application for asylum was rejected.

She later escaped from detention, got to the Netherlands, but was sent back to Malta in February 2011. She was then imprisoned for six months, but had become pregnant and miscarried in hospital in March 2011. She still lives in Hal Far, in Malta.

The court also found that her detention for 14 and a half months had been illegal, because the Maltese authorities had not taken any steps to deport her and had not reviewed the terms of her detention.

In the case of Mr Suso Musa, the court found that his detention had been arbitrary and the authorities had taken an unreasonable length of time to decide whether to let him stay in Malta. He entered Malta illegally by boat in April 2011 and remained in detention until March 2013.

Earlier this month Malta's Prime Minister Joseph Muscat said more than 400 migrants had arrived in the past week. As an EU member state it called for assistance from its EU partners to tackle the influx.

The summer months often see a stream of boats carrying migrants from Africa. Many arrive in Malta or at the Italian island of Lampedusa, hoping to gain access to other parts of the European Union.