5.  The applicant was born in 1992 and lives in Lobnya, Moscow Region. 6.  The background facts relating to the planning, conduct and dispersal of the demonstration at Bolotnaya Square are set out in more detail in Frumkin v. Russia (no. 74568/12, §§ 7-65, 5 January 2016), and Yaroslav Belousov v. Russia (nos. 2653/13 and 60980/14, §§ 7-33, 4 October 2016). The parties’ submissions on the circumstances directly relevant to the present case are set out below. 7.  On 6 May 2012 a public demonstration entitled the “March of Millions” was held in central Moscow to protest against the allegedly rigged presidential elections. The event had been approved by the city authorities in the form of a march followed by a meeting at Bolotnaya Square which was supposed to end at 7.30 p.m. The march was peaceful and held without any disruptions, but when the marchers arrived at Bolotnaya Square it transpired that barriers installed by the police had narrowed the entrance to the meeting venue, allegedly restricting the space allocated for the meeting. To control the crowd, a police cordon forced the protestors to remain within the barriers, and there were numerous clashes between the police and protesters. At 5.30 p.m. the police ordered that the meeting finish early and began to disperse the participants. It took them about two hours to clear the protestors from the square. 8.  On the same day the Moscow city department of the Investigative Committee of the Russian Federation opened criminal proceedings to investigate suspected acts of mass disorder and violence against the police (Articles 212 § 2 and 318 § 1 of the Criminal Code). On 18 May 2012 the file was transferred to the headquarters of the Investigative Committee for further investigation. On 28 May 2012 an investigation was also launched into the criminal offence of organising acts of mass disorder (Article 212 § 1 of the Criminal Code). The two criminal cases were joined on the same day. 9.  At the time of the events the applicant was a first-year student at the faculty of culture studies of the State Academic University for the Humanities. On 6 May 2012 he took part in the demonstration at Bolotnaya Square. According to him, he was beaten up by the police as they were dispersing the demonstration. 10.  At 4 a.m. on 7 May 2012 the applicant was admitted to the emergency ward of Sklifosovskiy hospital where he was examined by a trauma doctor and a neurosurgeon. The examination revealed multiple bruises on the applicant’s chest, spine, shoulders, knees and head. 11.  After the events of 6 May 2012 the applicant continued to live at his usual address and pursue his studies. On 9 June 2012 he was arrested on suspicion of having participated in acts of mass disorder and of using violence against the police during the demonstration of 6 May 2012. On the same day the Basmannyy District Court of Moscow ordered the applicant’s pre-trial detention until 9 August 2012. It referred to the gravity of the charges and information about the applicant’s personality. The District Court noted, in particular, that the applicant’s father was a Ukrainian national living in Ukraine, and that the applicant might therefore flee to avoid the investigation and trial. It concluded that those circumstances gave sufficient reasons to believe that the applicant, if he were at liberty, was likely to continue his criminal activity, influence witnesses, destroy evidence or otherwise obstruct the investigation of the criminal case, which was at an initial stage. 12.  On 18 June 2012 charges were brought against the applicant under Articles 212 § 2 (participation in acts of mass disorder accompanied by violence) and 318 § 1 of the Criminal Code (use of violence against a public official). He was accused, in particular, of having torn a protection helmet off a police officer’s head. 13.  On 11 July 2012 the Moscow City Court upheld the detention order of 9 June 2012. 14.  On 7 August 2012 the Basmannyy District Court of Moscow examined an investigator’s request for an extension of the applicant’s pre‑trial detention. The applicant requested that an alternative preventive measure be applied pending trial, such as house arrest or a written undertaking not to leave a specified place. On the same day the District Court found that the circumstances that had justified the detention order had not changed and extended the applicant’s detention until 6 November 2012. On 5 September 2012 the Moscow City Court upheld that decision. 15.  On 2 November 2012 the Basmannyy District Court authorised a further extension of the applicant’s detention until 6 March 2013. It reiterated the grounds given in the previous extension orders and stated that the circumstances justifying the detention order had not changed. On 3 December 2012 the Moscow City Court upheld that decision. 16.  On 21 November 2012 the charges against the applicant were reformulated. It was additionally stated that the applicant had shouted insulting slogans and used metal barriers to obstruct the police; that at least three times he had thrown stones and pieces of tarmac at police officers and had once punched a policeman; and that he had also grabbed a police officer’s uniform and had snatched a protection helmet from his hands. 17.  On 29 November 2012 Police Officer P. identified the applicant during an identification parade as a participant in the mass disorder and the person who had twice thrown pieces of tarmac at the police and tried to snatch the protection helmet from a policeman’s hands. He specified that he had not seen whether the applicant had in fact succeeded in snatching the helmet or not. 18.  On 7 December 2012 the investigator of the Zamoskvoretskiy Inter‑district Investigation Committee of Moscow refused to open a criminal case into allegations made by the applicant that he had been subjected to ill‑treatment by the police during his arrest. The investigator considered that the use of force by the police had been justified by the behaviour of the protesters, including the applicant, who had actively resisted their arrest and thrown various objects at the police officers. 19.  On 27 February 2013 the Basmannyy District Court granted an extension of the applicant’s detention until 9 June 2013, essentially on the same grounds as earlier, noting that the applicant’s state of health was satisfactory and did not warrant his release. That decision was upheld by the Moscow City Court on 27 March 2013. 20.  On 22 April 2013 the Moscow City Court authorised a further extension of the applicant’s pre-trial detention until 6 July 2013. The court noted that even though the applicant and his lawyer had already finished reading the case file, other defendants had not. It reiterated the grounds given in the previous extension orders and stated that the circumstances justifying the detention order had not changed. 21.  On 24 May 2013 the applicant’s criminal case was transferred to the Zamoskvoretskiy District Court of Moscow for the determination of criminal charges. 22.  On 6 June 2013 that court granted another extension of the applicant’s detention until 24 November 2013. The decision concerned eleven defendants. Along with the gravity of the charges, the court based its decision on the findings that “the reasons which initially warranted the detention have not changed” and that “no other measures of restraint would secure the aims and goals of the judicial proceedings”. The Moscow City Court upheld that extension order on 2 July 2013. 23.  On 19 November 2013 the Zamoskvoretskiy District Court examined an investigator’s request for an extension of detention in respect of nine defendants, including the applicant. The applicant presented a personal guarantee from a member of the State Duma in support of an undertaking by him to appear before the investigating authorities and the courts for the examination of his case. However, the District Court did not consider that guarantee and ordered that the applicant and his co-defendants be detained until 24 February 2014 on the grounds of gravity of the charges and the nature of the offences imputable to them. On 17 December 2013 the Moscow City Court upheld that extension order. 24.  From 20 June 2012 until his conviction the applicant was held in remand prison IZ-77/5 in Moscow. There he was detained in cells no. 403 (until 20 May 2013, then from 27 May 2013 to 19 June 2013, and from 29 June 2013 to January 2014), no. 12 (until 25 May 2013), no. 317 (until 27 May 2013), and no. 4 (until 29 June 2013). 25.  The cells had the following characteristics:
- cell no. 403: 40 sq. m. and ten sleeping places;
- cell no. 12: 6.1 sq. m. and one sleeping place;
- cell no. 317: 32.9 sq. m. and eight sleeping places;
- cell no. 4: 48 sq. m. and twelve sleeping places. 26.  The parties agreed that the number of inmates in the cells had not exceeded the design capacity. They also agreed that the size of the cells and the number of detainees had allowed the applicant four square metres of personal space and that the applicant had had an individual sleeping place in every cell. 27.  The parties provided the following accounts of the conditions in the cells. According to the applicant, prison cell no. 403 measured approximately 7 by 5 metres and housed ten inmates, including himself. The cell was inadequately lit and ventilated, was excessively hot in the summer and cold in the winter. The windows were too high to give sufficient light for reading or working with documents. A shower was allowed once a week and the lavatory pan was separated from the living space only by a plastic partition. The bed linen was old, and the beds were small for a man of his height. Outdoor exercise was limited to one hour per day. 28.  According to the Government, all of the cells had sanitary units with wash stands and the necessary furniture. The cells were equipped with ventilation, heating and lighting; the state of the sanitary facilities had been satisfactory; the bedding had been changed once a week; and the cells had been disinfected and subjected to pest control regularly. The applicant had been able to shower once a week and entitled to one hour of outdoor exercise per day. 29.  The applicant’s description of the conditions of detention during his transfer from the remand prison to court and back, and the Government’s submissions in that regard, were identical to those in the case of Yaroslav Belousov (cited above, §§ 69-73). 30.  As regards the conditions of detention in the holding room of the Moscow City Court, the applicant submitted that the room had been poorly lit and that access to a toilet had been limited to once an hour. In addition, he had been required to strip naked and to perform sit-ups during the body search conducted in the holding room. 31.  The court proceedings began on 6 June 2013 in hearing room no. 338 at the Moscow City Court, moving at the end of July 2013 to hearing room no. 635. The defendants, including the applicant, were held in glass cabins in both hearing rooms. From mid-September 2013 to the end of 2013 the hearings continued in hearing room no. 303 at the Nikulinskiy District Court of Moscow. In January and February 2014 they took place in hearing room no. 410 at the Zamoskvoretskiy District Court. Those hearing rooms were equipped with metal cages in which nine defendants (eight from 19 December 2013), including the applicant, sat during the hearings. 32.  For a detailed description of the conditions in those hearing rooms, see Yaroslav Belousov (cited above, §§ 74-77). 33.  On 6 June 2013 the Zamoskvoretskiy District Court of Moscow began a preliminary hearing in a criminal case against ten participants in the demonstration at Bolotnaya Square, who were charged with participating in acts of mass disorder and committing acts of violence against police officers. On 18 June 2013 the same court began the trial on the merits. 34.  On an unspecified date Police Officer T., the alleged victim of the applicant’s assault, was examined as a witness. He testified that at some point he had been surrounded by the crowd and subjected to violence. T. stated that the applicant had tried to snatch the protection helmet from his hands. Another officer, M., also questioned as a witness, stated that the applicant had shouted something and thrown a stone or a piece of tarmac at a policeman. 35.  On 21 February 2014 the Zamoskvoretskiy District Court found the applicant guilty as charged. It held, in particular, as follows:
“Between 4 p.m. and 8 p.m. on 6 May 2012 ... at Bolotnaya Square ... unidentified persons ... called those present [at the venue] to move outside the agreed meeting venue, to defy the lawful orders of the police ..., to use violence ... which led to mass disorder accompanied by the use of violence against public officials in connection with the performance of their duties [and] the destruction of property.
On the same day at 5 p.m. at the latest [the defendants] acquired the criminal intent to participate in mass disorder and to use violence against ... police officers ...
Moreover ... the participants of the acts of mass disorder threw pieces of tarmac, stones, sticks and other objects at the police ... which hit them on various parts of their body, and [the defendants] ... [who] participated in the acts of mass disorder ... implemented their criminal intent to use violence against public officials ... applied physical force which was not a danger to the life or health of those [officials] ...
Between 5.05 p.m. and 10 p.m. [the applicant] ... shouted insulting slogans and used metal barriers to block the police’s movement ... thus preventing the arrest of the participants in the acts of mass disorder ... [The applicant], acting intentionally, at least three times threw stones and pieces of tarmac at police officers in a targeted manner ... and used violence against an unidentified police officer which did not endanger his life or health ... unidentified participants in the acts of mass disorder, acting intentionally, tore a protection helmet off an unidentified police officer’s head and punched and kicked him several times in the head and body, meanwhile [the applicant] ... punched this police officer at least once.
[The applicant] ... used violence against Police Officer T. which did not endanger his life or health ...
... unidentified participants of the acts of mass disorder intentionally tore off [T.’s] protection helmet, which [T.] continued to hold in his hands, and punched him in the head and body, whereupon [the applicant] intentionally grabbed [T.’s] uniform and ... snatched the helmet from his hands.
[The applicant] pleaded not guilty and testified that ... he had decided to attend the public gathering on 6 May 2012 ... When leaving the Malyy Kamennyy Bridge [the applicant] saw a lot of police officers equipped with bullet-proof vests, helmets and truncheons, which filled him with indignation. As nothing was happening on the stage, [the applicant] decided to return ... when leaving the venue he saw the police officers randomly arresting people while hitting them with truncheons ... [The applicant] was hit in the back three times with a truncheon. When he saw these violent acts by the police, [the applicant] approached the barriers where other protestors were standing and expressed his indignation ... Then ... he tried to leave the venue ... when somebody tore off his shirt. ... At some point [the applicant] came across police officer [T.] ... who was not wearing any helmet. [The applicant] tried to leave, but suddenly police officers ran up to him and started to beat him in the head and body, then they arrested him and ... took him to a police vehicle. [The applicant] insisted that he had committed no acts in respect of police officer [T.], had not seen his helmet and had snatched nothing from his hands.
... the court considers the [defendants’] arguments that they were protecting somebody from police officers or happened to be victims of the police’s use of force as farfetched and aimed at mitigating their responsibility ...” 36.  The applicant was sentenced to three years and six months’ imprisonment, calculated on the basis of a three-year prison term under Article 212 § 2 of the Criminal Code, partly concurrent with a term of one year under Article 318 § 1. The applicant’s pre-trial detention counted towards the prison sentence. 37.  The applicant appealed. He complained, in particular, that he had not used metal barriers to block the police’s movement and insisted that he had been standing close to those barriers before the protestors had started to be arrested. The applicant also pointed out that the video records proved that he had not taken T.’s helmet and had not used violence against him. In his opinion, the first-instance court had not assessed his statements about ill‑treatment by the police. 38.  On 20 June 2014 the Moscow City Court upheld the first-instance judgment. 39.  The applicant was represented by a lawyer, Mr D., throughout the criminal proceedings at domestic level. On 11 January 2013 Mr D. sent the Court an introductory letter containing the outline of the applicant’s complaints of ill-treatment by the police on 6 May 2012 and of unjustified pre-trial detention. 40.  On 24 January 2013 the Registry of the Court acknowledged receipt of the introductory letter, registered under application no. 6312/13. The applicant was invited to return the completed application form within eight weeks of receipt of the Court’s letter but no later than 21 March 2013. As no further correspondence had been received from the applicant, on 28 August 2013 the Registry of the Court asked him whether he was still being represented by Mr D. and reminded him to return the completed application form. 41.  On 18 September 2013 the Court received the completed application form, signed by a different lawyer, Mr Agranovskiy. It contained complaints about the conditions of detention in the remand prison, in the courtroom and during transfers to and from the prison, and of unjustified pre-trial detention.