Greece is imprisoning unaccompanied migrant children in violation of EU laws and often in appalling conditions, human rights campaigners have revealed.

In a report detailing how asylum seekers and irregular migrants are being detained "as a matter of course, rather than a last resort," Amnesty International has excoriated Athens for its policy of imprisoning children for long periods.

Conditions are so appalling, the report says, that children resort to hunger strikes in protest at their imprisonment, and some even attempt suicide.

"It is never acceptable that children are detained. Children should not be subjected to poor conditions and long periods of confinement," said says Nicolas Beger, head of the group's Brussels office.

"Although Greece is experiencing economic hardship and is receiving a large number of migrants, these issues cannot serve as an excuse for treating children in such a way."

The group documents how conditions in a "vast number" of the country's immigrant detention centres are poor, with overcrowding and sanitation a problem.

Unaccompanied children who are captured by authorities when arriving in Greece are usually detained following their arrest for irregular entry. Where a deportation order is issued, detention continues until a legal guardian is appointed and a place found in a special reception centre for unaccompanied children.

Overcrowding is problem particularly in the summer when a large number of migrants attempt to make the perilous journey across the Mediterranean to what they believe to be the promised land of the European Union.

At the Pagani immigration detention centre in the summer of 2009, some 150 children went on hunger strike to protest the length and poor conditions of detention. More than 850 people, including 200 unaccompanied children, 150 women and 50 small children, were kept in overcrowded and insanitary conditions.

It was only after a visit from the UN High Commission for Refugees, and the ombudsman for the rights of the child, that the authorities released 570 people, mainly families with kids and unaccompanied children.

In a letter to the European Commission, the group has demanded the EU executive take action to ensure that Greece adheres to its legal obligations to migrants and refugees - and particularly their children.

Amnesty International believes that there should be a prohibition on the detention of unaccompanied children provided by law, but even in the absence of such a step forward, Greece is beholden to a number of international and EU obligations that should prevent such situations from occurring.

The UN Convention on the Rights of the Child, to which Greece is a party, states that in their best interests, ‘‘unaccompanied or separated children should not, as a general rule, be detained, and that a government provide "special protection and assistance" to children who are not in their family environment.

Furthermore, the EU's Reception Conditions Directive sets out special provisions for unaccompanied asylum-seeking minors.

"The reality for migrants in Greece is dire," said Mr Beger. "The EU must put pressure on Greece to improve the situation. Each and every person has the right to basic legal assistance and to humane treatment upon arriving in an EU country."