5.  The applicant was born in 1985 and lives in Râmnicu Vâlcea. 6.  On 8 April 2005 the applicant, then aged 19, was placed in pre-trial detention for twenty-four hours, following a criminal complaint made the previous day by D.A., a girl aged 17. She had complained that two girls, also minors, had brought her to an apartment where they had hit her and forced her to have oral sex or sexual intercourse with the applicant and three other boys, who were minors too. 7.  By an interlocutory judgment of the same day the Râmnicu Vâlcea District Court (“the District Court”) placed the applicant and the three other boys in pre-trial detention for twenty-nine days. The District Court considered that this measure was necessary, given the aggravated circumstances of the alleged offence and the serious risk it posed to society, the dangerous character of all the defendants, and their attitude during the investigation. By a decision of 11 April 2005 the Vâlcea County Court (“the County Court”) dismissed an appeal by the applicant against that judgment. 8.  Subsequently, the applicant’s pre-trial detention was regularly extended, by District Court interlocutory judgments on 25 April, 25 May, 29 June, 20 July, 24 August, 14 September, 19 October, 23 November and 21 December 2005, and 25 January 2006. The County Court dismissed appeals by the applicant against these judgments on 27 April, 27 May, 4 and 21 July, 9 and 25 August, 16 September, 21 October, 25 November and 23 December 2005, and 27 January 2006. The reasons given for continuing his detention remained the same throughout the proceedings, namely the seriousness of the offence, the sentence provided by the law, and the lack of any new circumstances justifying release pending trial. 9.  Several incidents occurred during the proceedings related to the pre‑trial detention. 10.  On the one hand, the appeal against the judgment of 20 July 2005 was reviewed twice by mistake, on 21 July and 9 August 2005. By an interlocutory judgment of 28 November 2005 the County Court rectified this mistake. 11.  On the other hand, on 21 July and 9 and 25 August 2005, when the appeals on points of law were reviewed by the County Court, the applicant was not brought before the judges. On each occasion the registrar of the County Court had telephoned Colibaşi Prison, where the applicant was held at the time. According to the registrar’s transcript, prison staff replied that it was not possible for them to bring the applicant to court because no such service for detainees was available on the dates in question (“nu există planificare pentru data de ...”). At the hearings on 21 July and 9 August 2005 the applicant was represented by a lawyer appointed by the County Court. The applicant had himself appointed a lawyer for the whole duration of the proceedings, but he maintained that the authorities had failed to notify his lawyer of the hearings held on 21 July and 9 August 2005. His lawyer was only present at the hearing on 25 August 2005. 12.  According to documents adduced to the file by the Government, on 16 September, 21 October and 23 December 2005 as well as on 27 January and 24 February 2006 the applicant was absent from the hearings at which the County Court reviewed his appeals on points of law against the interlocutory judgments extending his pre-trial detention. According to the registrar’s transcript drafted on each occasion the reason for his absence was also given as the lack of such a service for detainees on the dates in question. 13.  On 7 April 2005 the police heard D.A. in connection with her criminal complaint. The applicant’s lawyer was not present during that questioning. 14.  On 7 and 8 April 2005 the police also heard the applicant and his five co-defendants. The applicant declared that he knew both the victim and his co-defendants, whom he had met before. With regard to the victim’s allegations, he declared that he had gone to the apartment with the sole purpose of giving her and one of the other girls a lift home, and denied abusing the victim. He also declared that he had taken the victim home and had not noticed any signs of abuse on her. 15.  The applicant’s co-defendants made different statements: one of the two girls denied all the accusations and claimed that she had not seen the victim being abused; the other admitted that she had seen the victim being abused by the other girl and some of the boys, but denied being responsible herself. She declared that after the incident “she had heard” that the applicant had had oral sex with the victim. The boys either denied the accusations or claimed that they had had protected sexual intercourse or oral sex with the victim, who had acted willingly. Two of the boys declared that the applicant had been in the same room as the victim and that on coming out of the room he had said that he had had oral sex with her and that she was not looking good (“arăta rău”). 16.  In addition, two witnesses were heard. They confirmed that the applicant had been present at the apartment but claimed that they did not see or hear the victim being abused. 17.  On 21 April 2005 the applicant applied to the prosecutor attached to the District Court and requested a confrontation with D.A. He claimed that during the investigations the victim had made inconsistent statements and implied that such inconsistencies made it necessary for her to be confronted with the defendants. 18.  On 22 April 2005 the prosecutor attached to the District Court dismissed the applicant’s request with the reasoning that the factual situation had been clearly established and a confrontation would not have been useful to the investigation. 19.  On 25 April 2005 the prosecutor attached to the District Court issued a bill of indictment against the applicant on a charge of rape. The prosecution held that the applicant had forced D.A. to have oral sex with him while being aware that she was a minor, and that she had been abused by the others before he had arrived at the apartment where the events took place. 20.  The case was registered with the District Court. The applicant, through his lawyer, repeated several times his request for a confrontation with the victim for the contradictory aspects of her statements to be clarified. 21.  On 15 June 2005 D.A. was present before the District Court, with her mother and her lawyer. She was not heard by the court with regard to her criminal complaint. She only declared that she had civil claims to make. 22.  On 7 December 2005 the District Court heard all the defendants and the two witnesses. The applicant again denied the charges against him. The girl who had previously declared that she heard that he had abused the victim changed her statement, and declared that she had not seen the applicant abuse D.A. (see paragraph 15 above). At the same hearing the District Court agreed to the defendants’ request to cross-examine the victim. On 22 December 2005 and 16 January 2006 the District Court ordered D.A. to attend the trial by virtue of a warrant to appear. 23.  On 15 March 2006 D.A. was present at the hearing of the District Court. However, in application of the rules of procedure, she was not heard by the court because one of the defendants, a minor, was in hospital and therefore absent (see paragraph 31 below). 24.  By a judgment of 31 March 2006, the District Court sentenced the applicant to two years and six months’ imprisonment. The court relied on the statements made by the victim before the prosecutor and those made by the applicant’s co-defendants and the two witnesses. It dismissed the applicant’s statements, judging that they did not corroborate the other evidence or that they were inconsistent. 25.  All the parties lodged appeals. The applicant relied mainly on the fact that he had not had a confrontation with D.A., who had purposely refused to appear before the courts. He claimed that her statements had not been supported by any other evidence, and that he should not be sentenced solely on the basis of the victim’s complaint. 26.  On 21 June 2006 the County Court dismissed the applicant’s appeal but allowed the prosecutor’s and victim’s appeals. The applicant was sentenced to a heavier sentence, of five years’ imprisonment. The court did not address the applicant’s arguments related to the absence of a confrontation with the victim. 27.  Following appeals on points of law lodged by all the parties, on 18 September 2006 the Piteşti Court of Appeal allowed the prosecutor’s and the victim’s appeals. The Court of Appeal found that the lower courts had correctly assessed the evidence but that the clemency of the sentences did not match the gravity of the defendants’ acts. It therefore increased the applicant’s sentence to seven years’ imprisonment. 28.  By a judgment of 6 December 2006 the District Court dismissed an extraordinary appeal by the applicant (“revizuire”) on the ground that the legal requirements for a reopening of the proceedings had not been met.