While the border procedure for the examination of an application for international protection can be applied without recourse to detention, Member States should nevertheless be able to apply the grounds for detention during the border procedure in accordance with the provisions of the in order to decide on the right of the applicant to enter the territory. If detention is used during such procedure, the provisions on detention of that Directive should apply, including the guarantees for detained applicants, conditions of detention, judicial control, and the fact that an individual assessment of each case is necessary. As a rule, minors should not be detained. Only in exceptional circumstances, as a measure of last resort and after it has been established that other less coercive alternative measures cannot be applied effectively, inter alia non-custodial community-based placements, and after detention is assessed to be in their best interests in accordance with the , should it be possible to detain minors.