This Directive determines:
the terms for conferring and withdrawing long-term resident status granted by a Member State in relation to third-country nationals legally residing in its territory, and the rights pertaining thereto; and
the terms of residence in Member States other than the one which conferred long-term status on them for third-country nationals enjoying that status.