According to the Press Release of the CJEU:
'Nationals of Algeria, Morocco and Sierra Leone have challenged detention measures taken in respect of them before the Netherlands courts. The Netherlands Council of State and the District Court of The Hague, sitting in ’s-Hertogenbosch, have asked the Court whether EU law requires courts to review of their own motion any failure to comply with a condition governing the lawfulness of a detention measure which has not been invoked by the person concerned.
The Court recalls, first of all, that any detention of a third-country national, whether in the context of a return procedure as a result of an illegal stay, of the processing of an application for international protection or of the transfer of an applicant for such protection to the Member State responsible for examining his or her application, constitutes a serious interference with the right of that national to liberty enshrined in Article 6 of the Charter of Fundamental Rights of the European Union. Consequently, where it is apparent that the conditions governing the lawfulness of detention have not been or are no longer satisfied, the person concerned must be released immediately. That is the case, in particular, where it is found that the procedure for return, for examination of the application for international protection or for transfer, as the case may be, is no longer being carried out with due diligence, or that the detention measure is not, or is no longer, proportionate. The Court goes on to state that, in relation to detention of foreign nationals, the EU legislature has not confined itself to establishing common substantive standards, but has also established, in the light of the principle of effective judicial protection, common procedural standards, the purpose of which is to ensure that, in each Member State, there is a system which enables the competent judicial authority to release the person concerned, where appropriate after an examination of its own motion, as soon as it is apparent that his or her detention is not, or is no longer, lawful.
It follows that the judicial authority competent to review the lawfulness of a detention measure must take into consideration all the elements, in particular the facts, brought to its knowledge, as supplemented or clarified in the context of procedural measures which it deems necessary to adopt on the basis of its national law, and, on the basis of these elements, raise, where appropriate, the failure to comply with a condition governing lawfulness arising from EU law, even if that failure has not been raised by the person concerned. That requirement is without prejudice to the judicial authority’s obligation to invite each party to express its views on that condition in accordance with the adversarial principle.'