5.  The applicant was born in 1992 and lives in town Uzlovaya, Tula 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 became apparent 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 the police cordon forced the protestors to remain within the barriers; there were numerous clashes between the two sides. At 5.30 p.m. the police ordered the meeting to finish early and began to disperse the participants. It took them about two hours to clear 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 his arrest the applicant was a fourth-year student at the Russian State Humanities University. On 6 May 2012 he took part in the demonstration at Bolotnaya Square. After the events the applicant continued to live at his usual address and pursue his studies. 10.  On 8 June 2012 the applicant 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. 11.  On 9 June 2012 the Basmannyy District Court of Moscow ordered that the applicant be placed in pre-trial detention until 8 August 2012. It referred to the gravity of the charges and stated that if at liberty the applicant could co-ordinate his position with accomplices, who had yet to be discovered and whose identities were still being established by the investigation. The court concluded that those circumstances gave sufficient reasons to believe that the applicant was likely to flee to avoid the investigation and trial, continue his criminal activity, destroy evidence or otherwise obstruct the investigation of the criminal case, which was still at an initial stage. 12.  On 15 June 2012 charges were brought against the applicant under Articles 212 § 2 (participation in acts of mass disorder accompanied by violence) and 318 § 1 (use of violence against a public official) of the Criminal Code. He was accused, in particular, of attempting to break through the police cordon and of throwing pieces of tarmac and stones at Police Officer K., which had caused him a broken finger. 13.  On 16 July 2012 the Moscow City Court upheld the detention order of 9 June 2012. 14.  On 6 August 2012 the Basmannyy District Court examined an application from the investigator for an extension of the applicant’s pre-trial detention. The applicant asked for the preventive measure to be changed to house arrest, a written undertaking not to leave a specified place, or personal guarantees. On the same day the District Court granted the investigator’s application and extended the applicant’s detention until 6 November 2012. It considered that the circumstances justifying the detention order had not changed. 15.  On 12 September 2012 the Moscow City Court upheld the extension order of 6 August 2012. 16.  On 30 October 2012 the Basmannyy District Court granted an extension of the applicant’s detention until 6 March 2013, essentially on the same grounds as earlier, noting that the circumstances justifying the detention order had not changed. 17.  On 20 November 2012 the charges against the applicant were reformulated. It was stated that he had gone to the venue of the public event with a mask, which he had later put on to conceal his face. He had shouted anti-government slogans and thrown at least three pieces of tarmac at the police officers. One chunk had hit Officer K. on the right hand, causing him pain but no lasting harm. The classification of the offences remained unchanged. 18.  On 1 March 2013 and 22 April 2013 the Basmannyy District Court granted applications from the investigator for an extension of the applicant’s pre-trial detention, until 8 June and 6 July 2013 respectively. It considered that the circumstances justifying the detention order had not changed. The Moscow City Court upheld those extension orders on 10 April and 30 May 2013 respectively. 19.  On 24 May 2013 the applicant’s criminal case was transferred to the Zamoskvoretskiy District Court of Moscow for the determination of criminal charges. 20.  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 its 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 applicant’s request for an alternative preventive measure was dismissed on the grounds that no other measure could secure the proper course of justice in the case. The Moscow City Court upheld that extension order on 2 July 2013. 21.  On 19 November 2013 the Zamoskvoretskiy District Court granted another extension of detention in respect of nine defendants, including the applicant. It ordered their detention until 24 February 2014 on the grounds of the 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. 22.  The applicant was held in IZ-77/5 in four different cells for the whole period of his pre-trial detention from 20 June 2012. He did not provide any description of the conditions of his detention. 23.  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). 24.  As regards the conditions of detention in the convoy room of the Moscow City Court, the applicant submitted that it was poorly lit and that access to the toilet was 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 convoy room. 25.  On 6 June 2013 court proceedings began 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 at the Nikulinskiy District Court of Moscow in hearing room no. 303, while in January and February 2014 they took place at the Zamoskvoretskiy District Court in hearing room no. 410. Those hearing rooms were equipped with metal cages in which nine defendants (eight from 19 December 2013), including the applicant, sat during the hearings. 26.  For a detailed description of the conditions in those hearing rooms see Yaroslav Belousov (cited above, §§ 74-77). 27.  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 participation 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. 28.  On an unidentified date Police Officer K., the alleged victim of the applicant’s assault, was examined as a witness. He testified that he had noticed the applicant in the crowd wearing a black mask with eye holes. The applicant had acted aggressively and had thrown pieces of tarmac, bottles and stones at police officers along with other participants. One piece of tarmac had him on the right hand, which had caused a broken finger. K. had then arrested the applicant, who had tried to escape and had resisted the police officers. Another police officer, K.K., also questioned as a witness, testified that the applicant had thrown stones at the police officers. 29.  On 21 February 2014 the Zamoskvoretsky 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 ...
Thus, in furtherance of this criminal intent, at an unidentified time and place ... [the applicant] ... put on a mask to conceal his face so that he could not be recognised and brought to responsibility for committing unlawful acts ...
... between 5 p.m. and 6.30 p.m. [the applicant] ... repeatedly shouted anti‑government slogans.
Moreover ... the participants of the acts of mass disorder threw chunks 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] ...
[The applicant] used violence against Police Officer [K.] which did not endanger his life or health...
[The applicant] ... from 5 p.m. to 6.30 p.m. ... put on a mask to conceal his face ... and threw at least three pieces of tarmac ... at police officers in a targeted manner ... One of the pieces ... which measured 15 cm by 15 cm ... hit the police officer [K.] on the right hand ... which caused him pain. ...
[The applicant] pleaded not guilty and testified that ... he had decided to attend the public gathering on 6 May 2012 ... after the security check he put on a mask with eye holes because he wanted to avoid being recognised by members of the opposition ... When a stampede occurred, he tried to leave the venue but could not get out of the crowd ... At some point ... [the applicant] saw three police officers with truncheons heading in his direction. He got scared and tried to hide from them in the crowd but they ran him down and twisted his arms behind his back, and one of the police officers asked him why he was wearing a mask and then said that it was prohibited. ... [the applicant] took the mask off and the police officers conveyed him to a police vehicle. Then they returned the mask to him. ... [the applicant] did not pick up any objects or did throw them at the police, he did not engage in any acts against Police Officer K. and did not resist arrest.
... the court finds that [the applicant’s] guilt is established by the following evidence: ... a medical expert opinion stating that ... K. had a broken finger which could have been caused ... on 6 May 2012 ... the recovery process would take more than 21 days ...
... the court considers the [defendants’] arguments that they were protecting somebody from police officers or happened to be the victims of the police’s use of force as farfetched and aimed at the mitigation of their responsibility ... 30.  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 and four months under Article 318 § 1 of the Criminal Code. The applicant’s pre-trial detention counted towards the prison sentence. 31.  The applicant appealed. He contested his involvement in the acts of mass disorder and insisted that he had caused no injuries to Police Officer K. The applicant also complained that the court had refused to question Officer Sh., who could have confirmed his account of events. 32.  On 20 June 2014 the Moscow City Court upheld the first-instance judgment.