17Paragraph 11 of the udlændingeloven (Law on Foreign Nationals), in the version applicable to the facts in the main proceedings and resulting from Consolidated Law No 412 of 9 May 2016 and subsequent amendments thereof (‘the Law on Foreign Nationals’), was worded as follows:1. A residence permit in accordance with Paragraphs 7 to 9 f, 9 i to 9 n or 9 p is granted with the possibility of residence for an indefinite period or with a view to temporary residence in Denmark. The residence permit may be limited in time.…3.Unless there are grounds for revoking the residence permit pursuant to Paragraph 19, a foreign national aged 18 or over may apply for and obtain a permanent residence permit on the following conditions:(1) Subject to subparagraph 7, the foreign national must legally have resided in Denmark for at least six years, except in the cases provided for under subparagraphs 5 and 6, and must, throughout that period, have held a residence permit, issued pursuant to Paragraphs 7 to 9 f, 9 i to 9 n or 9 p ……(8) The foreign national must have been in full-time paid employment or self-employed (see subparagraph 8) for at least two years and six months during the three years preceding the issuing of a permanent residence permit.…5. Unless there are grounds for revoking the residence permit pursuant to Paragraph 19, a permanent residence permit may be issued at the request of a foreign national aged 18 or over who has legally resided in Denmark for at least four years and has, throughout that period, held a residence permit, issued pursuant to Paragraphs 7 to 9 f, 9 i to 9 n or 9 p, if he or she meets the conditions set out in subparagraph 3(2) to (9) and subparagraph 4. ……16. Even if the conditions set out in subparagraph 3(4) to (9) or subparagraph 4(1) to (4) are not met, a permanent residence permit may be issued to a foreign national aged 18 years or over if it cannot be required that these conditions are met in accordance with the international obligations of Denmark, including the [United Nations Convention on the Rights of Persons with Disabilities, approved on behalf of the European Community by Council Decision 2010/48/EC of 26 November 2009 (OJ 2010 L 23, p. 35)].’