6.  The applicants were born in 1969 and 1975 respectively and live in Sofia. 7.  Mr Raza left Pakistan in 1998, allegedly to flee from religious persecution. For a short time he remained in Iran and in Turkey, and later that year arrived in Bulgaria. Initially he sought asylum. However, after he married Mrs Raza on 20 February 2000, he withdrew his asylum claim and was granted a temporary residence permit on the strength of his marriage. In 2003 he was granted a permanent residence permit. He learned Bulgarian and started a small business, distributing electronic devices. He has not travelled out of Bulgaria since he first arrived there and has never been charged with any offence. 8.  On 6 December 2005 the head of the Ministry of Internal Affairs’ National Security Service made an order for Mr Raza’s expulsion. He also barred him from entering or residing in Bulgaria for a period of ten years, “in view of the reasons set out in proposal no. M‑2922/24.11.2005 and the fact that his presence in the country present[ed] a serious threat to national security”. The order relied on section 42 of the 1998 Aliens Act. No factual grounds were given, in accordance with section 46(3) of the Act. The order further provided that the first applicant was to be detained until it could be enforced, in line with section 44(6) of the Act. Finally, it stated that it was subject to appeal to the Minister of Internal Affairs, but not subject to judicial review, in keeping with section 46(2)(3) of the Act, and that it was immediately enforceable, in accordance with section 44(4)(3) of the Act (see paragraphs 31, 33 and 38 below). 9.  Mr Raza was not served a copy of the order and learnt about it on 18 January 2006, after being placed in detention (see paragraph 10 below). 10.  On 30 December 2005 the head of the Ministry of Internal Affairs’ Migration Directorate issued an order under section 44(6) and (8) of the 1998 Aliens Act (see paragraphs 38 and 39 below) to place Mr Raza in a special detention facility pending enforcement of the expulsion order. The order relied on the need to have him sent back to his country of origin. It said that it was subject to appeal before the Minister of Internal Affairs and to judicial review by the Sofia City Court. Mr Raza was arrested on the same day. 11.  After it was found that Mr Raza did not have a valid passport, on 24 January 2006 the Ministry of Internal Affairs requested the consular department of the Ministry of Foreign Affairs to contact the closest embassy of Pakistan – the one in Bucharest, Romania – with a view to obtaining a passport or other travel documents. Further requests were made on 1 and 30 March 2006, 10 October 2007 and 3 June 2008, without success. It is unclear whether the consular department of the Ministry of Foreign Affairs forwarded those requests to the Pakistani embassy. 12.  On 18 July 2006 the detention facility where Mr Raza was being kept was closed down and he was transferred to another facility. 13.  On 11 July 2007 Mr Raza applied for release. On 28 December 2007 the head of the Migration Directorate turned down his request. 14.  On 15 July 2008 the head of the Migration Directorate decided to release Mr Raza. He also stayed the enforcement of the order for his expulsion, citing technical difficulties, and placed him under an obligation to report daily to his local police station. 15.  On 8 August 2008 Mr Raza asked the head of the National Security Agency to re‑consider the order for his expulsion. On 4 September 2008 his request was turned down, on the ground that the order was final. 16.  Mr Raza is currently awaiting expulsion, which is apparently being blocked solely by the fact that he does not have the necessary documents to re‑enter Pakistan. 17.  On 4 January 2006 Mr Raza appealed to the Minister of Internal Affairs against the order for his expulsion (see paragraph 8 above). He argued that it was unlawful, because he resided legally in Bulgaria, lived with his wife and had never committed any offence. On 21 February 2006 the Minister rejected the appeal, saying that there existed information that Mr Raza had been involved in human trafficking. He went on to specify that in cases of expulsion on national security or public order grounds it was not open to the administrative authorities to take into account extraneous considerations; if the necessary prerequisites were in place, the authorities were bound to take the measure in question. 18.  On an unspecified date in early 2006 Mr Raza sought judicial review of the expulsion order by the Sofia City Court. He additionally asked the court to stay the order’s enforcement. He asserted, inter alia, that he had been married to a Bulgarian national for a number of years and had never engaged in any unlawful activities. He also pointed out that he had never been served a copy of the order for his expulsion and was not aware of the grounds for such a measure. He asked the court to request the immigration authorities to produce the materials which had led to the order. 19.  In a decision of 7 December 2006 the court found the application admissible, holding that the bar to judicial review set out in section 46(2) of the 1998 Aliens Act (see paragraph 33 below) was contrary to the Convention and was thus to be disregarded. It relied on this Court’s judgment in the case of Al‑Nashif v. Bulgaria (no. 50963/99, 20 June 2002). It turned down the request for a stay of the order’s enforcement, observing that its immediate enforcement was mandated by statute – section 44(4)(3) of the 1998 Aliens Act (see paragraph 31 below). In those circumstances, the courts were not competent to stay the enforcement, as this would amount to a judicial revision of a statute. In any event, Mr Raza had not put forward any arguments capable of persuading the court that the order should be stayed. 20.  Mr Raza did not appeal against the court’s refusal to stay the enforcement of the expulsion order. 21.  The court held a non‑public hearing on 17 May 2007. It admitted in evidence the administrative case file with the materials leading to the expulsion order, allowed Mr Raza to inspect them, and gave him leave to adduce evidence in support of his allegations. 22.  In view of amendments to the 1998 Aliens Act making expulsion orders subject to review by the Supreme Administrative Court (see paragraph 35 below), on 6 July 2007 the Sofia City Court transferred the case to the Supreme Administrative Court. 23.  The Supreme Administrative Court heard the case on 22 November 2007. Mr Raza, who was legally represented, did not adduce evidence. He argued that the order was unlawful, as it did not specify the grounds for expelling him, and said that he would develop his arguments in pleadings that he would file later. Counsel for the authorities argued that the order was well-founded, as could be seen from the adduced evidence. The public prosecutor, who took part in the proceedings ex officio, argued that since the law specifically provided that no reasons were to be given for expulsion orders, the court was not competent to review the substantive lawfulness of the order, but only whether the procedure had been followed. 24.  In a final judgment of 17 January 2008 the Supreme Administrative Court dismissed Mr Raza’s application. According to the applicants, apart from a short declaration that Mr Raza’s expulsion would not breach Article 8 of the Convention, the court did not engage in any analysis of the proportionality of that measure. Nor did it scrutinise the facts underlying the decision to expel Mr Raza, or have before it the full text of the proposal for his expulsion, but merely a short excerpt from it, drawn up by the authorities specifically for the purposes of the judicial review proceedings. 25.  The applicants were not able to provide a copy of the Supreme Administrative Court’s judgment because the case is classified and neither they nor their counsel are allowed to make copies of any of the materials in the case file, including that judgment. Despite a specific request by the Court, the Government did not provide a copy of that judgment either, or specify what materials the Supreme Administrative Court had had before it when making it (see paragraph 5 above). 26.  On an unspecified date in early 2006 Mr Raza sought judicial review of the order for his placement in a detention facility (see paragraph 10 above). On 22 May 2007 the Sofia City Court allowed his application and quashed the order. It found that the order was subject to review despite the express wording of section 46(2) of the 1998 Aliens Act (see paragraph 33 below) because that provision was contrary to Article 13 of the Convention. It also found that it had been made by a competent authority and in line with the applicable legal provisions. However, it went on to say that Mr Raza’s detention for such a long period had become unjustified, the authorities having been unable to deport him for more than a year. There was no indication that the immigration authorities had taken any measures in that respect except asking for the cooperation of the Ministry of Foreign Affairs. 27.  Following an appeal by the Ministry of Internal Affairs, on 6 June 2008 (реш. № 6854 от 6 юни 2008 г. по адм. д. № 9478/2007 г., ВАС, III о.) the Supreme Administrative Court annulled that judgment and discontinued the proceedings. It held that the order for Mr Raza’s placement in a detention facility was subordinate to the order for his expulsion and had been made within the framework of the expulsion proceedings, for the sole reason that the expulsion could not be carried out forthwith. It was therefore not subject to judicial review by itself. 28.  On 16 January 2008 the applicants sought judicial review of the decision of 28 December 2007 turning down Mr Raza’s application for release (see paragraph 13 above). On 7 May 2008 the Sofia Administrative Court declared Mrs Raza’s application inadmissible, because she was not directly affected by the order, but found Mr Raza’s application admissible and well‑founded. It noted that the immigration authorities had sent three letters to the consular department of the Ministry of Foreign Affairs with requests for assistance in the process of securing a travel document for Mr Raza, but that no reply had been received. It went on to say that, in view of the difficulties in carrying out the expulsion, the authorities should have re‑considered whether or not Mr Raza’s detention continued to be justified. In situations where they had discretion, the authorities had to assess whether or not the impugned measures interfered disproportionately with the individual’s rights and, whenever possible, opt for the option that was less onerous for the individual, in line with the principle of proportionality. The exercise of such discretion was subject to judicial review. Instead of keeping Mr Raza in custody, the authorities could have placed him under an obligation to report daily to his local police station. In choosing between those alternatives, they had to take account of the length of the detention. If it exceeded six months, it became an arbitrary deprivation of liberty, contrary to Article 5 § 1 (f) of the Convention. The inordinate amount of time spent by Mr Raza in custody, owing to the lack of effective measures for his expulsion, had negated the lawfulness of his deprivation of liberty. As the authorities had not taken those matters into account, they had made an unlawful decision. The court therefore quashed the refusal to release Mr Raza and instructed the authorities to re‑consider the matter in line with its reasoning. 29.  The Director of the National Police Service appealed. On 26 May 2009 the Supreme Administrative Court declared the appeal inadmissible (опр. № 6873 от 26 май 2009 г. по адм. д. № 10138/ 2008 г., ВАС, III о.). It held that the Director did not have standing to appeal, as the proceedings before the lower court had unfolded between the applicants and the immigration authorities. Moreover, since Mr Raza had meanwhile been released (see paragraph 14 above), the issues raised in the appeal were no longer relevant.