5.  The applicant was born in 1992 and lives in Tver.
6.  The facts of the case, as submitted by the parties, may be summarised as follows.
7.  On 7 May 2009 the applicant and his classmate A. were arrested on suspicion of causing grievous bodily injuries to a boy from their school. They confessed to their deeds. The applicant was initially released under parental supervision, whilst A. was remanded in custody. The following day they retracted their confessions.
8.  On 16 November 2009, after the investigator had reclassified their actions as a more serious offence, the Zavolzhskiy District Court in Tver ordered the applicant’s placement in custody, citing the gravity of the charges and the fact that he had recanted. The District Court interpreted the latter element as amounting to the risk of an obstruction of justice. On 11 December 2009 the Tver Regional Court upheld the detention order on appeal, finding as follows:
“[The fact that the defendant] has a permanent place of residence, lives with his family, is studying in high school and does not have a criminal record does not provide a basis for rejecting unconditionally the investigator’s application [for a detention order] in the light of the extreme gravity of the charges.”
9.  On 12 January 2010 the District Court extended the authorised detention period, pointing out that the applicant “had changed his attitude to the committed offence from an outright acknowledgement to a downright denial”. In the court’s opinion, that implied that the applicant might interfere with justice if released. The District Court also added that the custodial measure was necessary “to secure the enforcement of the conviction”. On 3 February 2010 the Regional Court upheld the District Court’s assessment on appeal, in particular its finding that a non-custodial measure would not be sufficient to secure the enforcement of the conviction.
10.  On 20 January 2010 the investigator in charge of the applicant’s case refused the parents’ request for leave to visit their son, reasoning as follows:
“The investigation appointed Mr V. Smirnov, the father of Mr A. Smirnov, as the legal representative of the underage defendant. However, the investigation considers that Mr V. Smirnov is using all means to interfere with the criminal proceedings because of his vested interests; he has not responded when summonsed by the investigator or court, and is causing all kinds of delays in the proceedings. The investigation considers that this kind of conduct on the part of Mr V. Smirnov may have a negative influence of the defendant Mr A. Smirnov, as well as interfering with the establishment of the truth in the criminal case.”
11.  On 25 January 2010 the supervising prosecutor rejected a complaint from the applicant’s father about the investigator’s decision, recalling that the granting of leave to visit a detainee was at the investigator’s discretion rather than being a legal obligation and that the arguments for refusing leave were “persuasive and well-justified”.
12.  On 3 February 2010 the District Court issued a further extension order, holding that the applicant had been charged with a particularly serious offence and that the circumstances warranting the application of a custodial measure still obtained. On 19 February 2010 the Regional Court upheld the order on appeal.
13.  The final extension order of 11 March 2010 referred to the gravity of the charges against both co-defendants, without distinguishing between their individual situations.
14.  By a judgment of 25 March 2010, the Regional Court found the applicant and his co-defendant guilty of attempted murder and sentenced each of them to five years’ imprisonment. On 9 June 2010 the Supreme Court of the Russian Federation upheld the conviction.
15.  Between November 2009 and July 2010 the applicant’s parents visited him in prison a total of sixteen times. All visits were carried out under the supervision of a warden while the applicant was separated from his parents by a glass partition.