The Appellant is a national of Eritrea. But she was born in Ethiopia on 2 July 1981, where she lived continuously until she departed for the United Kingdom in July 1998. On arrival, she claimed protection as a refugee on the grounds of a fear of persecution in Eritrea. She also claimed that she could not go back to Ethiopia because her life would be in danger there. The Secretary of State granted her temporary admission under paragraph 21 of Schedule 2 to the Immigration Act 1971 (the 1971 Act). Her status has not changed since her arrival in 1998. Her temporary admission has been extended from time to time, and she remains liable to detention under paragraph 16 of Schedule 2 to the 1971 Act. Her claim that she was a refugee was refused by the Secretary of State on 1 November 2004, and she was informed that the Secretary of State proposed to give directions for her removal to Eritrea. The Appellant appealed. By a decision of 1 February 2006, the Asylum and Immigration Tribunal allowed her appeal and held that her fear of persecution in Eritrea on Refugee Convention grounds was well founded. Her status as a refugee was thereby established. The Secretary of State did not appeal against this decision. On 24 August 2006 the Secretary of State served a new notice of decision refusing the Appellants application for leave to enter on the grounds of a fear of persecution in Ethiopia and gave notice of her intention to give directions for the removal of the Appellant to Ethiopia. The Appellant appealed these decisions, but at the same time started judicial review proceedings seeking an order that she be given leave to enter/remain in the UK as a refugee pursuant to the tribunals decision of 1 February 2006 and an order quashing the removal directions to Ethiopia. The appeal has been adjourned pending the outcome of these judicial review proceedings. The judge in the Administrative Court granted the relief sought, but her decision was reversed by the Court of Appeal. The appellant now appeals to this court, arguing that she is entitled to protection under article 32 of the Refugee Convention and cannot therefore be removed to Ethiopia. The Supreme Court unanimously dismisses the appeal. The judgments are given by Lord Hope and Lord Dyson. Article 33 of the 1951 Refugee Convention prohibits any contracting state from expelling or returning (refouler) a refugee in any manner whatsoever to the frontiers of territories where his life or freedom would be threatened on account of his race, religion, nationality, membership of a particular social group or political opinion. Every refugee has the protection of that provision. The more generous protection of Article 32, however, is afforded to a more restricted category of persons. Article 32(1) provides that The Contracting States shall not expel a refugee lawfully in their territory save on grounds of national security or public order. The effect of this is that, once a refugee has been admitted or his presence has been legalised and so long as he retains his status as a refugee, he is entitled to stay indefinitely in the receiving state. He can only forfeit that right by becoming a risk to national security or by disturbing the public order. The question in this case is whether Article 32 applies only to a refugee who has been given the right under domestic law lawfully to stay in the contracting state, or whether the words lawfully present in the territory must be given an extended and autonomous meaning, so that a refugee who has not yet been given a right to remain in the territory is afforded protection under Article 32 that extends beyond the basic obligation under Article 33 not to expel or return to a territory where his life or freedom would be threatened for a Convention reason [1 2]. The first step in this case is to examine the language of Article 32 and to determine, provisionally, whether the words that it uses, taken by themselves, can accommodate the situation in which the Appellant finds herself. The second is to consider whether, if they cannot, the object and purpose of the Convention require the words to be read and given effect more broadly so as to afford the Appellant the protection which she seeks against her removal to Ethiopia [26]. There is some academic support for the Appellants argument that the class of beneficiary referred to in Article 32 should be broadly interpreted, but this approach is not universally accepted, and there is no judicial authority that is directly in point. The argument has to be examined, therefore, as raising an issue of principle [28]. There is no doubt that the Convention should be given a generous and purposive interpretation [30]. However, it must be remembered that the Courts task is to interpret the document to which the contracting parties have committed themselves by their agreement. It has no warrant to give effect to what they might, or in an ideal world would, have agreed [31]. The context in which the word lawfully appears in Article 32 is important. The phrase in which it appears contemplates that the refugee is not merely present in the territory of the contracting state, but that he is there lawfully. It implies that his presence is not just being tolerated, but he has a right to be there [32]. There is no consensus among the commentators that lawful presence should be given an autonomous meaning or what that meaning should be. We must therefore take our guidance from what the framers of the Convention must be taken to have agreed to, as understood by the UN High Commissioner for Refugees [34 & 63]. That is, that the lawfulness of the stay is to be judged against national rules and regulations governing such a stay [33]. In this case, the relevant national rule is section 11(1) of the 1971 Act, which provides that a person who has not otherwise entered the UK shall be deemed not to do so as long as he is detained, or temporarily admitted or released while liable to detention, under the powers conferred by Schedule 2 to the Act. Under that provision, the Appellant is deemed not to have entered this country [34 & 57]. There is no question of the Appellant being expelled from the UK while the statutory processes of appeal remain open to her and have not been brought to an end. But one should be cautious about saying that, just because in practice the Appellant is not at risk of removal for the time being, she is here lawfully within the meaning of Article 32, as that would have far reaching consequences [35]. Furthermore, the same phrase lawfully in their territory is used in Articles 18 and 26 in relation to self employment and free movement [36]. It seems unlikely that the contracting states would have agreed to grant to refugees the freedom to choose their place of residence and to move freely within their territory before they themselves had decided, according to their own domestic laws, whether or not to admit them to the territory in the first place [37 & 57]. For these reasons, the word lawfully in Article 32(1) must be taken to refer to what is to be treated as lawful according to the domestic laws of the contracting state [40]. This interpretation is consistent with the fundamental principle that the power to admit and expel foreign nationals is a power of the sovereign state [58]. Counsel for the Appellant submitted that, in view of the fact that the UK had recognised her as a refugee, the Appellant was entitled to the assurance that she would not be removed to a third country that was not able to provide her with the full panoply of rights she would get as a refugee under the Convention. Article 32(1) had to be read in that sense [41 42]. However, whether a refugee would have the benefit of the panoply of Convention rights in a territory to which she is expelled cannot have any bearing on the question whether she is lawfully present in the territory from which she is being expelled. This would be to infer a different meaning from the words lawfully in their territory than the contracting states appear to have had in mind when they agreed to them [47 & 64]. There are thus no sound grounds for departing from the view that lawfully in Article 32(1) must be taken to refer to what is to be treated as lawful according to the domestic laws of the contracting state. This is what the framers of the Convention intended by the use of this word in this context [49].