Mr Justice Chan PJ : 1. I agree with the judgment of Mr Justice Hartmann NPJ. Mr Justice Ribeiro PJ: 2. I agree with the Judgment of Mr Justice Hartmann NPJ. Mr Justice Tang PJ: 3. I have read the judgment of Mr Justice Hartmann NPJ in draft. I respectfully agree with it and have nothing to add. Mr Justice Hartmann NPJ: The Issue in this Appeal 4. Article 24(3) of the Basic Law provides that permanent residents of the Hong Kong Special Administrative Region shall have right of abode. It is a right of considerable significance, including the right to live in Hong Kong without any condition of stay and free of any threat of deportation or removal[1]. 5. As to who qualifies to be a permanent resident, article 24(2)(4) provides that permanent residents shall include persons not of Chinese nationality “who have entered Hong Kong with valid travel documents, have ordinarily resided in Hong Kong for a continuous period of not less than seven years and have taken Hong Kong as their place of permanent residence”. 6. Recognition of permanent residence status pursuant to article 24(2)(4) is subject to a number of statutory qualifications contained in the Immigration Ordinance[2] ('the Ordinance'). Two of the qualifications are relevant to this appeal: (1) Paragraph 1(4)(b) of Schedule 1 to the Ordinance provides that, for the purpose of calculating the seven years of continuous ordinary residence stated in article 24(2)(4), the period of seven years immediately preceding the date of an application to the Director of Immigration (‘the Director’) for verification of permanent residence status shall be the basis of calculation. (2) S 2(4)(b) of the Ordinance provides that, for the purpose of assessing whether an applicant has over the required period of seven years “ordinarily resided” in Hong Kong, he shall not be treated as having been ordinarily resident: “during any period… of imprisonment or detention pursuant to the sentence or order of any court.” 7. Whether these two statutory qualifications are consistent with article 24(2)(4) of the Basic Law and, if so, their true nature and extent has been considered by this Court on two previous occasions, first, in Fateh Muhammad v Commissioner of Registration & Another[3]; second, in Prem Singh v Director of Immigration[4]. The two judgments confirm that the statutory qualifications are consistent with article 24(2)(4) and therefore constitutional. 8. Concerning paragraph 1(4)(b) of Schedule 1 to the Ordinance, the judgments held that an application for verification of permanent residence is to be judged at the time when an application is made by reference to the period immediately preceding that application. It is not therefore to be judged in the light of events which take place after the date of application. 9. Concerning s 2(4)(b) of the Ordinance, that is, the provision excluding any period of imprisonment or detention pursuant to the sentence or order of any court from the calculation of a person’s term of ordinary residence, the judgments concluded that, to be consistent with article 24(2)(4), “detention” was to be read ejusdem generis with “imprisonment” so that only periods of imprisonment or detention imposed in consequence of a breach of the criminal law were to fall within the ambit of the section. It was held that, in the context of an application to be recognised as a permanent resident, it is consonant with the ordinary and natural meaning of the phrase “ordinary residence” to exclude periods of imprisonment and detention which are punitive but not other forms of detention which do not evidence punishment for criminal wrongdoing, for example, an order of detention made by a court by reason of a subject’s mental illness. 10. It is in this context that the single issue that is the subject of this appeal arises. The issue is whether, consistent with the existing jurisprudence of this Court, a period of time spent in custody pending trial, when the trial itself results in a conviction and sentence of imprisonment, is to be read, in terms of s. 2(4)(b) of the Ordinance, as a period of “ imprisonment or detention pursuant to the sentence or order of any court”. Background 11. The factual circumstances which give rise to the issue may be summarised as follows. 12. The respondent, a national of Pakistan, came to Hong Kong in 1997 when he was 16 years of age to visit his father and other family members. Shortly thereafter he was granted permission to remain in Hong Kong as a dependent of his father. 13. In September 2005, the respondent was arrested and charged with two counts of wounding with intent. The charges arose out of a street fight between two groups of young men, the respondent being a member of one of the groups. Initially, the respondent was granted bail. However, in November 2005, when his case was transferred to the District Court for trial, his bail was rescinded and he was remanded in custody pending trial. 14. During the time that he was held in custody pending trial, the respondent entered into written communications with the Director concerning his entitlement to be verified as a permanent resident pursuant to article 24(2)(4). For reasons which are no longer in issue, the Court of Appeal held that this exchange between the respondent and the Director was to be read as resulting in a claim made by the respondent to the Director in mid-March 2006 for verification of his status as a permanent resident. 15. It is accepted that, at the time when he made his application to the Director, if the fact that he was held in custody pending trial was not taken into account, the respondent had been ordinarily resident in Hong Kong on a continuing basis for at least the previous seven years. 16. Some two weeks after the respondent was found to have made his application to the Director, he was brought to trial, convicted of both counts of wounding with intent and sentenced to 3 years imprisonment. 17. While serving his sentence, the respondent was informed by the Director that consideration was being given to his deportation from Hong Kong upon the completion of his sentence. Clearly, the primary reason for that considered course was the fact that the respondent had been found guilty of serious criminal offences. As it was, the day before his release from prison the respondent was served with an order of deportation for life issued by the Secretary for Security. 18. It was the service of this order which precipitated the respondent’s judicial review proceedings. The proceedings below: 19. In his judgment at first instance[5], Andrew Cheung J (as he then was) contrasted (i) a period of custody pending trial when the person in custody is then released before trial or acquitted with (ii) a period of detention pending trial, followed by conviction and a sentence of imprisonment. He accepted that plainly the latter period of remand in custody is not a period of “imprisonment pursuant to the sentence” of a court in terms of s 2(4)(b). The question therefore was whether it falls within the meaning of “detention pursuant to the order of any court”. 20. It was his finding that the concept of a period of custody pending trial, when the trial itself results in a conviction and sentence of imprisonment, while not on all fours with the more limited concept of imprisonment pursuant to sentence, was nevertheless of the “same nature”. In this regard, he looked to Bokhary PJ’s conclusion in Fateh Muhammad v Commissioner of Registration & Another[6] that: “In a provision like s 2(4)(b) “detention” and “order” must, in my view, be read as being of the same nature as “imprisonment” and “sentence” respectively.” [emphasis added][7] 21. A principal basis for the finding lay in the operation of s 67A of the Criminal Procedure Ordinance[8]. That section provides that, if a person has been held in custody pending his trial, the length of any consequent sentence of imprisonment is to be treated as reduced by that pre-trial period of detention. Cheung J accepted that s 67A does not act to turn a period of remand into a period of imprisonment but acts only to reduce any sentence of imprisonment imposed after trial. Nevertheless, in his view, when a period in custody pending trial results in a conviction and imprisonment, s 67A operates to render the period in custody pending trial of “the same nature” as the sentence of imprisonment imposed after trial. 22. Cheung J further took into account the ordinary and natural meaning in common law of the phrase “ordinarily resident”, placing reliance on Lord Scarman’s definition in R v Barnet L.B.C., ex parte Shah[9]. “Unless, therefore, it can be shown that the statutory framework or the legal context in which the words are used requires a different meaning, I unhesitatingly subscribe to the view that “ordinarily resident” refers to a man’s abode in a particular place or country which he has adopted voluntarily and for settled purposes as part of the regular order of his life for the time being, whether of short or of long duration.” Adopting a purposive approach to the construction of s 2(4)(b), the judge considered that detention pending trial, when the trial results in a conviction and sentence of imprisonment, was not consonant with the common law concept of “ordinarily resident”. The element of voluntariness on the part of the individual was missing. Far from being “ordinary”, such imprisonment was “out of the ordinary”. 23. Cheung J further took into account that – “… as a matter of general principle, no man should be allowed to profit from his own wrongdoing. It would lie ill in the mouth of the prisoner to assert the status of a permanent resident based on seven continuous years’ residence by taking advantage of his time of imprisonment in Hong Kong. It would simply offend one’s sense of what is right and fair.”[10] 24. In the result, Cheung J held that at the time when the respondent made his application to the Director for verification of his permanent resident status he was not ordinarily resident in Hong Kong. 25. The Court of Appeal[11] (Stock VP, Fok JA and Lam J) did not accept this analysis. 26. Giving the leading judgment of the court, Stock VP saw no warrant for widening the ambit of the term “detention pursuant to an order of any court” beyond the parameters first set by this Court in Fateh Muhammad and endorsed in its later judgment in Prem Singh, both holding that within the context of s 2(4)(b) “detention” was to be read ejusdem generis with “imprisonment”, both limited to imprisonment or detention as a consequence of a breach of the criminal law. 27. An order that a person be held in custody pending trial is not imposed for any breach of the criminal law; such an order is not in any way equivalent to a sentence. It is made solely to ensure the integrity of the criminal justice process. The Vice President was of the view that S 67A of the Criminal Procedure Ordinance does not ex post facto alter this fact: “The sentence commences on the date it is imposed. Section 67A… does not deem the sentence of imprisonment to have started from an earlier date, namely, the date of remand. And a judge does not have power to order a sentence to commence on some earlier date. Section 67A operates merely to treat the sentence passed as reduced: see Chan Hung v Commissioner of Correctional Services [2000] 3 HKC 767.[12] 28. The Vice President continued: “I am far from asserting that a true state of affairs on a given date may not be ascertained by reference to matters coming to light after that date. Nonetheless, the subsequent conviction and s 67A do not turn the remand order into something it is not, namely, a sentence of imprisonment.”[13] 29. Looking to the consequences of an interpretation in accordance with that made at first instance, the Vice President observed: “… the argument which permits ex post facto characterisation of the nature of the detention would enable, possibly require, the decision-maker in the face of an extant verification application, to delay his decision in order to await trial and its outcome and consequential appeals (and then, if there were an acquittal, to discount that period in custody); a scenario which is unlikely to have been in the legislature’s contemplation.”[14] 30. The Vice President further expressed concern that an interpretation in accordance with that made at first instance would give rise to a potential for injustice. This was on the basis that too much would turn on whether an applicant was or was not granted bail. If granted bail, he would remain ordinarily resident and able to seek verification of his status as a permanent resident; if refused bail, he would no longer be ordinarily resident. 31. For these reasons, the Vice President held that the provisions of s 2(4)(b) do not shut out an applicant by reason only of a period of remand in custody pending trial. The respondent was therefore held to be “ordinarily resident” at the time when he made his application to the Director. Submissions before this Court 32. Lord Pannick QC, who appeared as leading counsel for the appellants[15],submitted that the interpretation sought by the appellants - that a period in custody pending trial, when the trial resulted in conviction and imprisonment, fell within the meaning of “detention pursuant to the… order of any court” - was properly accommodated within the jurisprudence of this Court set out in Fateh Muhammad and Prem Singh. The following matters of law were common ground: (1) Within the context of s 2(4)(b), “detention pursuant to the… order of any court” was of the same genus as “imprisonment pursuant to the sentence… of any court”. Both had to be punitive in nature. (2) Detention pending trial by the order of any court was not punitive in nature. It was designed to ensure the integrity of the criminal trial process not to inflict punishment. (3) A sentence of imprisonment commenced when it was imposed; it was not retrospective. (4) For the purposes of article 24(2)(4) of the Basic Law, an application for verification of permanent residence is to be judged by reference to the seven-year period immediately preceding the date of application. 33. Within these confines, Lord Pannick’s submission was succinct, being founded upon the uncontentious proposition that, as s 2(4)(b) sought to qualify a constitutional provision, it was to be given a purposive construction. 34. Central to his submission was the operation and effect of s 67A of the Criminal Procedure Ordinance. While Lord Pannick did not seek to conflate the concept of detention pending trial with that of imprisonment imposed after conviction by sentence of a court, he submitted that it was permissible in seeking a purposive construction to look to the entirety of the process. That process consists, first, of a period of detention in custody pending trial, second, the subsequent conviction and sentence to a term of imprisonment and, third, the fact that by operation of s 67A the length of that sentence is to be treated as being reduced by the time spent in custody pending trial. It was submitted that, viewed as such, the period of custody pending trial becomes integral to the sentence of imprisonment, defining its true term. The causative link is s 67A. That link, it was submitted, drew the two concepts into such close proximity that in such circumstances a period of custody pending trial falls within the ambit of “detention pursuant to the… order of any court” in s 2(4)(b). 35. The following matters, it was suggested, must weigh in support of such a purposive construction. (1) By way of general observation, detention pending trial, by its nature, does not accord with the ordinary and natural meaning of the term “ordinarily resided” as defined by Lord Scarman in ex parte Shah[16]. Even if not consequent upon sentence, it is nevertheless an enforced presence which cannot be regarded as voluntarily adopted nor does it qualify as being for a settled purpose. It is a condition that is out of the ordinary. (2) Seven years ordinary and continuous residence is a qualification prescribed by the Basic Law for attaining a valuable status and right, namely, the status of a permanent resident and the right of abode[17]. For this reason it is appropriate to give article 24(2)(4) a restrictive meaning, limiting the scope and application of the statutory machinery allowing for the attainment of the right. Relevant to this, when looking to a period of detention pending trial, when the trial results in conviction and imprisonment, is the observation of Cheung J at first instance that “as a matter of general principle, no man should be allowed to profit from his own wrongdoing”. 36. It was further submitted that this construction would avoid one ‘stark anomaly’. Absent this construction, persons who are held in detention pending trial and persons who are on bail are both considered for the duration of that period to be ordinarily resident. If however both are convicted and sentenced to terms of imprisonment, the operation of s 67A reduces the sentence of the one who has been held in custody pending trial, enabling him to begin tolling afresh his seven years ordinary residence earlier than the one who has been on bail pending his trial. Conclusions 37. In my judgment, Lord Pannick’s submission must fail on the basis that s 67A does not constitute the compelling link that his submission requires it to be. 38. In Vallejos and Domingo v Commissioner of Registration[18], which is to be handed down on the same day as the present judgment, it is pointed out that Ex parte Shah[19] serves only as a starting-point when approaching the meaning of “ordinarily resided” in article 24(2)(4) of the Basic Law. It is also emphasised that the quality of residence relied on is important to determining whether it constitutes “ordinary residence” in the particular case. There is a fundamental qualitative difference between detention pending trial and imprisonment pursuant to the sentence of the court after trial. The first, even though it imposes hardship on the individual, is not punitive. The second is designed for the very purpose of being punitive. In this qualitative sense, an order of detention pending trial is more akin to an order of detention made by a court by reason of a subject’s mental illness, neither having any punitive element, and it is undisputed that the latter order is excluded from the ambit of s 2(4)(b). 39. The legislative intent behind s 67A is plain. It does not seek to reduce a sentence of imprisonment, the sentence remains the same. It does not seek to conflate the different regimes of detention prior to trial and imprisonment consequent upon sentence after trial. They remain separate regimes. It seeks to do no more than treat the individual prisoner fairly by recognising the hardship imposed upon him if, prior to his trial, he was kept in custody for the purpose of ensuring the integrity of the criminal trial process. 40. If, as agreed, a sentence of imprisonment takes effect when it is imposed, having no retrospective effect, I do not see that a limited statutory measure such as s 67A, which is only triggered if a sentence of imprisonment is imposed after trial, is capable of reaching back and giving to a period of detention pending trial the necessary punitive character so that, as a part of the full process of detention, conviction and imprisonment but nevertheless a distinct part, it is to be treated, for the purposes of s 2(4)(b), as being of the same genus as a sentence of imprisonment. 41. Lord Pannick has very correctly said that a supporting element of any purposive construction is the avoidance of unfairness. In my view, however, the far greater potential for unfairness lies in his construction. I say that because its consequence is to place pivotal emphasis on the uncertainties of seeking bail, a matter to which Stock VP alluded in his judgment in the Court of Appeal. A simple example suffices. Two persons charged with the same offence seek bail. One is able to obtain the provision of a surety which secures his liberty, the other is not. On the construction proposed, the one who secures bail is not constrained by s 2(4)(b) and remains ordinarily resident in Hong Kong while the one who fails to secure bail is constrained by the section and from the time of the order placing him into detention pending trial is no longer ordinarily resident. This is, and remains, so even if both are convicted after trial and sentenced to terms of imprisonment. 42. Finally, it seems to me that in a purposive construction of s 2(4)(b) there is much to be said for the need to seek finality in the administrative scheme managed by the Director in verifying claims for permanent resident status. The temporal parameters set by paragraph 1(4)(b) of Schedule 1 to the Ordinance are unambiguous and consistent with nature and purpose of article 24 (2)(4). 43. For the reasons given, I would dismiss the appeal, costs following the event. Sir Anthony Mason NPJ: 44. I agree with the judgment of Mr Justice Hartmann NPJ. Mr Justice Chan PJ : 45. The Court unanimously dismisses the appeal with costs. Lord Pannick QC, Mr Anderson Chow SC and Ms Eva Sit, instructed by Department of Justice for the appellants Mr Hectar Pun and Mr Newman Lam, instructed by Yip & Liu for the respondent [1] See s 2A of the Immigration Ordinance. [2] Cap 115. [3] (2001) 4 HKCFAR 278. [4] (2003) 6 HKCFAR 26. [5] [2010] 3 HKLRD 594. [6] p.283F. [7] Bokhary PJ went on to qualify this interpretation by saying: “Accordingly the only kind of detention covered by s 2(4)(b) is detention in a training centre or in a detention centre. (The word “order” in s 2(4)(b) is needed because, although s.4 of the Training Centres Ordinance (Cap 280) speaks of a “sentence of detention”, s 4 of the Detention Centres Ordinance (Cap 239) speaks of a “detention order”.)” Before us, other statutory provisions imposing “orders of detention” for breaches of the criminal law were identified, more particularly s 17 of the Reformatory Schools Ordinance, Cap 225; s 14 of the Juvenile Offenders Ordinance, Cap 226, and s 4 of the Drug Addiction Treatment Centres Ordinance, Cap 244. [8] Cap 221. [9] [1983] 2 AC 309, at 343G. [10] Paragraph 28 of the judgment. [11] Unreported, CACV 87/2010 dated 28 June 2011. [12] Paragraph 38. [13] Paragraph 40. [14] Paragraph 42. [15] Together with Mr Anderson Chow SC and Ms Eva Sit. [16] Supra, paragraph 22. [17] See the judgment of Bokhary PJ in Fateh Muhammad, p.284E. [18] FACV Nos. 19 and 20 of 2012. [19] Supra, paragraph 22.