5.  The applicant was born in 1978 and lives in Sumgayit. 6.  On 6 March 2010 the applicant was arrested by the police on suspicion of possession of narcotic substances. According to a record dated 6 March 2010 relating to the carrying out of operational measures and the seizure of physical evidence (əməliyyat tədbirlərinin keçirilməsi və maddi sübutun götürülməsi haqqında protokol), the applicant was arrested by the police at 11.30 p.m. on 6 March 2010 in Sumgayit, on the basis of operational information that he was in possession of narcotic substances. He did not resist arrest and was taken to the Sumgayit City Police Office (“the Police Office”), where he was searched in the presence of two police officers and two attesting witnesses. It appears from the record that the applicant was not represented by a lawyer. During the search, narcotic substances were found on his person. 7.  On 9 March 2010 the applicant was charged with illegal possession of a large quantity of narcotic substances with intent to sell, under Article 234.4.3 of the Criminal Code. 8.  On 10 March 2010 the Sumgayit City Court, relying on the official charges brought against the applicant and the prosecutor’s request to apply the preventive measure of remand in custody (həbs qətimkan tədbiri), ordered the applicant’s detention for a period of two months, calculating the period of detention from 9 March 2010. 9.  The applicant did not appeal against that decision. 10.  On the same day the Sumgayit City Court also delivered a separate special decision (xüsusi qərar), acknowledging a violation of the applicant’s right to liberty. In this connection, the court held that the investigator had unlawfully deprived the applicant of his liberty, because the applicant had not been brought before a judge within forty-eight hours of his arrest, as required by the relevant law. The court also informed the Police Office about the investigator’s unlawful action, and asked the Police Office to inform it about the measures taken in this respect within one month. 11.  According to the applicant, following his arrest by the police on 6 March 2010, he was taken to the Police Office, where he was detained in various rooms. He was repeatedly subjected to ill-treatment in police custody, with the aim of extracting a confession from him. He was also forced by the police to make an incriminating statement against two other people arrested in connection with possession of narcotic substances. As he refused to make the statements requested by the police, on 6 and 7 March 2010 he was regularly beaten with wooden and rubber truncheons, and was given electric shocks and cigarette burns by police officers X., S. and M. 12.  On 10 March 2010 the applicant met his lawyer for the first time when he was brought before the Sumgayit City Court. According to the applicant’s lawyer, he made an oral complaint at the hearing before the Sumgayit City Court in the presence of the Sumgayit city deputy prosecutor, complaining that the applicant had been ill-treated in police custody. He also pointed out the signs of ill-treatment present on the applicant’s body, and requested his examination by a forensic expert. However, no action was taken by the court or the prosecuting authorities in respect of the applicant’s ill-treatment. 13.  On 3 and 10 April 2010 the applicant’s lawyer lodged a written complaint with the investigator in charge of the case, complaining that the applicant had been ill-treated in police custody. In this connection, he pointed out that, although he had made such a complaint at the hearing of 10 March 2010 before the Sumgayit City Court, no action had been taken by the investigating authorities. The lawyer asked the investigator for a forensic examination of the applicant. He also asked the investigator to question the applicant and organise a formal face-to-face confrontation between the applicant and the other co-accused in his presence. No action was taken by the investigator. 14.  On an unspecified date in April 2010 the lawyer informed the Ombudsman of the applicant’s ill-treatment in police custody and the investigator’s failure to order a forensic examination of the applicant. 15.  Following a conversation between the applicant and agents from the Ombudsman’s Office in a temporary detention centre, on 22 April 2010 the Ombudsman requested that the Prosecutor General’s Office carry out a forensic examination of the applicant and conduct an effective investigation into his allegation of ill-treatment. 16.  By a letter of 7 May 2010, the Prosecutor General’s Office informed the lawyer that the complaint submitted by the Ombudsman concerning the applicant’s alleged ill-treatment by the police would be examined, and he would be informed of its outcome. 17.  In the meantime, on 5 May 2010 the investigator had ordered a forensic examination of the applicant. It appears from forensic report no. 600 dated 11 May 2010 that the forensic expert noticed an abrasion (sıyrıq) measuring 5 cm by 1.2 cm on the applicant’s left wrist joint. He concluded that the injury had been caused by a hard blunt object, and could have been inflicted on 6 March 2010. The expert stated that the severity of the injury had not been determined, because it was not an injury causing harm to health. 18.  On an unspecified date in May 2010 the applicant’s case was assigned to another investigator. 19.  On 25 May 2010 the applicant’s lawyer was provided with a copy of the forensic report of 11 May 2010. He immediately asked for a new forensic examination, claiming that the applicant’s forensic examination had been conducted in his absence and in breach of relevant procedural rules. He also claimed that, although numerous injuries were still visible on the applicant’s body, the expert had noted only one injury in his report. 20.  On 26 May 2010 the investigator granted the request and ordered a new forensic examination of the applicant. 21.  On 1 June 2010 the applicant’s lawyer lodged a new request with the investigator, asking to participate in the forensic examination. He also asked the investigator to allow him to photograph and make a video recording of the forensic examination. 22.  On 3 June 2010 the investigator granted the request in part, allowing the lawyer to participate in the forensic examination. 23.  On 8 June 2010 the Sumgayit city deputy prosecutor refused to institute criminal proceedings in connection with the applicant’s allegation of ill-treatment. He held that it had not been established that the applicant had been beaten by the police officers, or that the injury found on his left wrist joint had been caused by them while he was in police custody. However, the prosecutor also found that the applicant had been unlawfully detained in police custody from 6 to 7 March 2010 in the absence of any official record of his arrest. In this connection, he decided to inform the Police Office of the unlawful actions of the police officers. 24.  In the meantime, on an unspecified date the applicant’s lawyer had lodged a complaint with the Sumgayit City Court under the procedure concerning the review of the lawfulness of procedural actions or decisions by the criminal prosecuting authority under Article 449 of the Code of Criminal Procedure. He complained, in particular, that the applicant had been ill-treated in police custody, that the investigator had failed to reply to his complaints concerning the ill-treatment, and that the applicant’s procedural rights had been violated within the framework of the criminal proceedings. 25.  In the proceedings before the Sumgayit City Court the judge heard the applicant, the two other co-accused, the applicant’s lawyer, the police officers involved in the applicant’s arrest, and the two investigators who had been in charge of the applicant’s case. Although the police officers denied the ill-treatment allegation, the investigator who had replaced the first investigator in charge of the case stated that he had also noticed the signs of a beating on the applicant’s body during his questioning. 26.  On 25 June 2010 the Sumgayit City Court delivered a decision, finding that the applicant had been subjected to torture and violent treatment (işgəncə və zorakı rəftar) in police custody. In this connection, the court relied on the conclusions of the forensic report of 11 May 2010 and the statement made by one of the investigators. The court also held that, at the court hearing, the applicant’s body had shown signs of ill-treatment as established by the court. The court further found that the applicant had been unlawfully detained in the Police Office, and that he had been questioned by the investigator in the absence of his lawyer. The court ordered the Sumgayit city prosecutor’s office to investigate the fact that he had been ill‑treated. 27.  On 5 July 2010 the Sumgayit city prosecutor lodged an objection against the Sumgayit City Court’s decision of 25 June 2010. 28.  On 21 July 2010 a panel composed of two forensic experts issued a report concerning the second forensic examination of the applicant. It appears from forensic report no. T76/2010 that the applicant was examined by the forensic experts in the presence of his lawyer on 23 June 2010. During the examination the applicant stated that he had been tortured in police custody, and gave a detailed description of his ill-treatment. In particular, he stated that on 6 and 7 March 2010 police officers X., S. and M. had tortured him with truncheons, a device which gave electric shocks and cigarette burns. As a result of the examination, the experts noticed numerous scars (çapıq) and areas of pigmentation (piqmentasiya sahələri) on various parts of the applicant’s body. They pointed out that, while the scars had been caused by a hard blunt object, the areas of pigmentation had resulted from intense heat. The experts concluded that these injuries had been inflicted three to six months prior to the examination, and the characteristics of the injuries did not contradict the applicant’s description of ill-treatment. 29.  On 27 July 2010 the Sumgayit Court of Appeal dismissed the prosecutor’s objection, finding the first-instance court’s decision justified. As to the fact of the applicant’s ill-treatment, the appellate court held that this was supported by the expert reports of 11 May and 21 July 2010, which confirmed the existence of various injuries on his body. The court further held that the investigator who had replaced the first investigator in charge of the case had also stated before the court that he had noticed injuries on the applicant’s body when he had questioned him. The court lastly noted that it had taken into account the fact that, although the applicant had been examined by the forensic experts a few months after his beating by the police officers, there were still signs of ill-treatment on his body. 30.  On 24 August 2010 the applicant’s lawyer lodged a complaint with the Prosecutor General’s Office and the Ministry of Internal Affairs, complaining that the investigating authorities had failed to investigate the applicant’s ill-treatment, despite the explicit acknowledgment of the fact of the ill-treatment by the court decisions of 25 June and 27 July 2010. 31.  On 20 September 2010 the Sumgayit city deputy prosecutor again refused to institute criminal proceedings in connection with the applicant’s ill-treatment. The prosecutor concluded that the injuries found on the applicant’s body had not been caused in police custody. In this connection, he noted that the applicant was a drug addict and that there was a likelihood that the injuries had been caused by “external influences” (kənar təsirlərdən) before he had been taken to the temporary detention centre. 32.  On 8 October 2010 the applicant’s lawyer lodged a complaint with the Prosecutor General’s Office against that decision. He complained, in particular, that the prosecuting authorities had unlawfully refused to investigate the applicant’s ill-treatment, despite the explicit acknowledgment of the fact of the ill-treatment by the relevant court decisions. 33.  No action was taken by the prosecuting authorities. 34.  On 7 May 2010 the Sumgayit City Court extended the applicant’s detention pending trial for a period of one month, namely until 7 June 2010. The court indicated as the reason for its decision that it needed more time to perform some investigative actions, such as the carrying out of forensic narcotic and psychiatric examinations. It further relied on the gravity of the charges against the applicant, and the existence of a risk of his absconding from and obstructing the investigation. 35.  The applicant appealed against that decision, claiming that the first‑instance court had failed to justify the extension of his detention. 36.  On 14 May 2010 the Sumgayit Court of Appeal upheld the first‑instance court’s decision. The appellate court’s reasoning was essentially the same as that in the first-instance court’s decision. 37.  On 3 June 2010 the Sumgayit City Court again extended the applicant’s detention for a period of one month. The court justified this by relying on the necessity to carry out further investigative actions within the framework of the criminal proceedings. 38.  On 4 June 2010 the applicant appealed against the decision, reiterating that there was no reason to hold him in detention, and that the first-instance court had failed to justify his continued detention. 39.  On 11 June 2010 the Sumgayit Court of Appeal dismissed the appeal, finding that the extension order was justified. The appellate court justified its decision by relying on the gravity of the charges and the risk of the applicant’s absconding from the investigation. 40.  On 6 July 2010 the Sumgayit City Court extended the applicant’s detention until 22 July 2010. The court again justified the extension by relying on the necessity to carry out further investigative actions. 41.  The applicant did not appeal against that decision. 42.  On 11 July 2010 the investigator reclassified the criminal charges against the applicant, replacing the previous charges under Article 234.4.3 of the Criminal Code with new charges under Article 234.1 (illegal possession of narcotic substances in a quantity exceeding that necessary for personal consumption, without intent to sell). 43.  On 21 July 2010 the investigator issued a bill of indictment under Article 234.1 of the Criminal Code and filed it with the Sumgayit City Court. 44.  On 6 August 2010 the Sumgayit City Court held a preliminary hearing. At that hearing, the prosecutor stated that there had been numerous breaches of procedural rules during the investigation, and that the bill of indictment had not been compiled in accordance with the requirements of the relevant law. He asked the court to discontinue its examination of the criminal case and remit it to the prosecutor supervising the investigation. The court granted the prosecutor’s application. The court’s decision made no mention of the applicant’s detention, even though the latest extension order had expired on 22 July 2010. Under domestic law, a decision taken at a preliminary hearing was not open to appeal. 45.  On 13 August 2010 the prosecutor lodged an application with the Sumgayit City Court, asking for an extension of the applicant’s detention until 7 September 2010. 46.  On 16 August 2010 the Sumgayit City Court dismissed the application, finding that there was no basis for such an extension. However, taking into account the prosecutor’s intention to lodge an objection against that decision, the court ordered the applicant’s detention for a period of seven days. 47.  On 23 August 2010 the Sumgayit Court of Appeal dismissed the prosecutor’s objection and upheld the first-instance court’s decision. The applicant was released from detention. 48.  On the same day the applicant lodged a request with the investigator, asking for unlawfully obtained evidence to be removed from the case file and the criminal proceedings against him to be discontinued. 49.  By a decision of 26 August 2010, the investigator dismissed the applicant’s request. 50.  In the meantime, following the applicant’s release from detention, on 25 August 2010 the investigator in charge had issued a decision placing the applicant under police supervision (polisin nəzarəti altına vermə). The decision did not detail the duration of that preventive measure. According to the applicant, his placement under police supervision lasted approximately five or six months, during which time he was obliged to report to the police twice a week and not leave the city where he resided. At the end of this period, although he was no longer required to report to the police, he was not provided with any official decision confirming the end of his placement under police supervision.