The detention of applicants should be applied in accordance with the underlying principle that a person should not be held in detention for the sole reason that he or she is seeking international protection. Detention should be for as short a period as possible and subject to the principles of necessity and proportionality, thereby only being allowed as a measure of last resort. In particular, the detention of applicants must be in accordance with Article 31 of the Geneva Convention. The procedures provided for under this Regulation in respect of a detained person should be applied as a matter of priority, within the shortest possible deadlines. As regards the general guarantees governing detention, as well as detention conditions, where appropriate, Member States should apply the provisions of also to persons detained on the basis of this Regulation. Minors should, as a rule, not be detained and efforts should be made to place them in accommodation with special provisions for minors. In exceptional circumstances, as a measure of last resort, after it has been established that other less coercive alternative measures cannot be applied effectively, and after detention is assessed to be in the best interests of the child, minors could be detained in the circumstances provided for in .