5.  The applicant was born in 1965 and lives in Riga. 6.  On 3 March 2004 criminal proceedings were initiated against the applicant for Internet fraud. 7.  In the course of the pre-trial investigation the applicant underwent two inpatient psychiatric examinations. On both occasions the applicant was found to have full mental capacity (pieskaitāms). 8.  On 3 October 2006 the Riga City Vidzeme District Court found the applicant guilty and gave him a suspended six-month prison sentence. The applicant and his counsel appealed. 9.  Taking into account that during the hearing of the appeal court of 9 January 2007 the applicant was said to have “behaved aggressively towards the advocate and the prosecutor [and] in the course of the subsequent hearings [had] made illogical and disjointed statements”, on 13 March 2007 the Riga Regional Court decided to request an outpatient psychiatric assessment. 10.  On 27 April 2007 a psychiatrist found that the applicant was suffering from chronic paranoid schizophrenia and that his participation in court hearings was therefore “unhelpful” (nav lietderīga). The psychiatrist recommended that the applicant undergo outpatient treatment. 11.  On 18 June 2007 a single judge of the Riga Regional Court decided to initiate proceedings with a view to applying a compulsory measure of a medical nature. Taking into account that “the nature of [the applicant’s] illness [did] not permit him to take part in court proceedings”, it was decided that the case would be examined in the applicant’s absence, with the participation of a prosecutor, defence counsel, a legal representative for the applicant and an expert psychiatrist. The applicant’s mother was named as his legal representative. 12.  The applicant’s mother did not attend the following hearing on 19 September 2007. She had sent the court a letter stating that she would be unable to attend court hearings due to ill-health. She also expressed her belief that her son had legal capacity and was able to express his own point of view. During the hearing the prosecutor suggested that D.A., a psychiatrist responsible for the applicant’s medical treatment, could better serve as his legal representative, a suggestion which was approved by the court with the consent of the applicant’s counsel and the expert psychiatrist. 13.  The subsequent hearing on 16 October 2007 was attended by D.A., who described the applicant as “chaotic”, “contemptuous” and as having “delirious fantasies”. She considered that he should be ordered to undergo involuntary outpatient psychiatric treatment. She explained that if the applicant did not take medication he did not become aggressive, but became “a burden on society”. At the conclusion of the hearing, the defence counsel, D.A. and the prosecutor all agreed that an additional inpatient psychiatric assessment ought to be carried out, which was ordered by the court. 14.  The inpatient assessment was completed on 27 November 2007 and the applicant was diagnosed with episodic paranoid schizophrenia with increasing residual symptoms (paranoīda epizodiskas norises šizofrēnija ar pieaugošām reziduālām parādībām). It was concluded that at the time he had committed the incriminated acts, he had been unable to control his actions. It was therefore recommended that he be relieved of criminal liability. 15.  On 18 February 2008 the Riga Regional Court decided to relieve the applicant of criminal liability and imposed a compulsory measure of a medical nature – outpatient treatment in a medical institution. It held that such a measure best corresponded to the non-violent nature of the applicant’s actions and to his state of health. It appears that this decision was not appealed against and entered into force on 11 March 2008. The Riga City Vidzeme District Court was named as the court responsible for supervising enforcement of the Regional Court’s order. 16.  On 1 March 2007 criminal proceedings were initiated against the applicant for fraud. On 15 March 2007 the police received information that he was registered (atrodas uzskaitē) as an outpatient of a psychiatric hospital. 17.  On 8 October 2007 the applicant was informed that he was a suspect. On the same day, referring to the psychiatric assessment of 27 April 2007 (see paragraph 10 above), the police decided to request an additional forensic psychiatric assessment of him. 18.  The applicant underwent such an assessment. A report dated 29 October 2007 established that he was suffering from chronic paranoid schizophrenia and was therefore unable to take responsibility for his actions or control them. Because of this he was deemed unable to participate in the pre-trial investigation of the criminal case against him or to give adequate statements during the investigation. The expert report recommended that a compulsory measure of a medical nature be ordered – outpatient psychiatric treatment in a medical institution. 19.  The prosecutor in charge of the case against the applicant decided to pursue proceedings with a view to applying a compulsory measure of a medical nature. After receiving information from the psychiatric hospital that in the first set of proceedings the applicant’s legal representative was D.A., on 7 February 2008 the prosecutor decided to allow D.A. to again take on that role. 20.  On 19 August 2008 a hearing of the applicant’s case was held in the Riga Regional Court. The panel consisted of judge I.Š. and two lay judges. The applicant was represented by a lawyer A.Ā. A prosecutor, an expert psychiatrist and D.A. also attended the hearing, but the applicant was not present. According to the applicant, he had not appointed A.Ā. or anyone else as his defence counsel. 21.  D.A. stated to the court that the applicant had:
“obsessive thoughts concerning various acts of a legal nature. I believe that if he had an opportunity to arrive at any office, if he had an access to a computer, he would be capable of committing repeated criminal acts. ... I consider that [the applicant] could be a danger to society and that he should receive treatment”. 22.  The court also heard the testimony of the expert psychiatrist G.S. who had produced the expert report of 29 October 2007 (see paragraph 18 above). G.S. explained to the court that at the time the expert report was drawn up she had not been aware that the applicant had previously been involved in other criminal proceedings in which he had been found to be in a state of mental incapacity (nepieskaitāms) and that he “was continuing [his] criminal activity”. She considered that nobody could control whether the applicant was taking medication and therefore recommended that he undergo involuntary inpatient treatment. 23.  The applicant’s defence counsel indicated to the court that, given the applicant was continuing to commit crimes while ill and taking into account his mental state, it was necessary to order his inpatient treatment in a psychiatric hospital. The prosecutor agreed. 24.  In a decision dated 20 August 2008 the court held that the applicant had to be relieved of criminal liability. It also considered that he posed a danger to society and ordered his inpatient treatment in a psychiatric hospital. A copy of the decision was sent to D.A. on 25 August 2008. 25.  The decision was not appealed against in time and became final on 2 September 2008. 26.  On 12 September 2008 the decision was sent to a psychiatric hospital in Riga for enforcement. 27.  It is not clear when the applicant first received a copy of that decision. The Government provided copies of two not entirely legible handwritten pages, which allegedly came from the applicant’s medical records, and which appear to indicate that on 19 August 2008 (the day before the Regional Court’s decision was pronounced) the applicant had been informed of the court’s decision to order his involuntary inpatient treatment and had expressed his frustration with that decision. The applicant appears to claim that he never received a copy of the decision. 28.  On 9 September 2008 the applicant requested the Riga Regional Court to revoke the compulsory measures of a medical nature imposed on him “in full”. However, the wording of his letter only referred to the decision of 18 February 2008 (see paragraph 15 above). In a response given on 16 September 2008 judge I.Š. observed that the applicant was not complaining about the decision of 20 August 2008, which had become final on 2 September 2008, and therefore returned his complaint letter to him. 29.  On 13 March 2009 the applicant lodged an appeal with the Riga Regional Court against “the decision of 19 August 2008”. Since he received no reply, on 26 March 2009 he inquired as to its progress. In a letter of 9 April 2009 judge I.Š. “once again” explained to the applicant that he had been represented in court by D.A., who had not lodged an appeal. The decision had therefore become final. The letter further informed the applicant that he did not have the locus standi to lodge an appeal. On 14 April 2009 the applicant received a letter from another judge of the Riga Regional Court, D.T., who explained to him that only D.A. could lodge an appeal in his name. 30.  On 9 April 2009 judge I.Š. sent the decision of 20 August 2008 to the police with a request that it be enforced. 31.  On 2 October 2009 judge I.Š., acting pursuant to section 607(4) of the Criminal Procedure Law (see paragraph 46 below) requested an assessment of the applicant’s mental health in order to decide the question of whether to continue applying the compulsory measure of a medical nature. 32.  On 8 October 2009 the director of the psychiatric hospital invited the Regional Court to examine whether it was necessary to continue applying the compulsory measure of a medical nature to the applicant and forwarded to it the report of a medical panel dated 20 August 2009. The panel had found that the applicant had regularly attended the hospital, but had done so “without any inner motivation and without any understanding of his illness or of the necessity to take medication”. It was concluded that the applicant suffered from paranoid schizophrenia and that despite treatment with medication, there was no evidence of any stable improvement to his psychiatric health or that he was in remission. It was recommended that the applicant be ordered to continue outpatient treatment. 33.  It does not appear that the Regional Court took any decision pursuant to section 607(4) of the Criminal Procedure Law. 34.  On the evening of 22 October 2009 several police officers entered the applicant’s flat and took him to a psychiatric hospital in Riga. According to the applicant, on 26 October 2009 doctors at the hospital informed him that he had been brought in on the basis of a decision of the Riga Regional Court. 35.  On 29 October 2009 judge I.Š. sent a request to the psychiatric hospital for a report on the state of the applicant’s mental health, in order to examine the question of whether it was necessary to continue involuntary inpatient psychiatric treatment pursuant to section 607(4) of the Criminal Procedure Law. The letter indicated, inter alia, that the applicant had not been admitted to hospital any earlier than on 22 October 2009 “for reasons unknown to the court”.
 36.  On 31 October 2009 the applicant addressed a petition to the Supreme Court. He indicated that he had been undergoing outpatient psychiatric treatment in line with the recommendations of panels of medical specialists that had been adopted in September 2008 and in February and August 2009. He requested the Supreme Court to quash the decision which had apparently ordered his admission to the psychiatric hospital (the contents of which were unknown to him). Lastly, the applicant pointed out that he had not been present at the court hearing during which the question of the deprivation of his liberty had been decided and that he had had no lawyer representing him there. 37.  The applicant received a reply dated 5 November 2009 from judge I.Š., who explained that his treatment as an outpatient between the adoption of the decision on 20 August 2008 and 22 October 2009 had been erroneous (nepamatota). As regards the decision of 20 August 2008 the judge explained that the applicant’s interests had been represented by D.A. and A.Ā., neither of whom had appealed against the decision. It had therefore become final. 38.  In the meantime, on 3 November 2009 a panel of three medical specialists issued a report, finding that the applicant’s health had “changed notably, characterised by symptoms of delirium against a background of reduced affection”. The report recommended that the applicant be ordered to continue involuntary inpatient treatment in a psychiatric hospital. 39.  On 15 November 2009 the applicant sent a complaint to the Supreme Court against the “decision” of judge I.Š. contained in her letter of 5 November 2009. He pointed out that after the decision of 20 August 2008 had been adopted in his absence and without him being represented by a lawyer, he had been complying with the terms of that decision by being treated in a psychiatric hospital from September 2008 onwards. The applicant asked the Supreme Court to quash the decision on the basis of which the police had detained him and taken him to the psychiatric hospital on 22 October 2009. He repeated his allegation that he was not and had never been represented by a lawyer. The response he received to the complaint again came from judge I.Š., which was sent on 23 November 2009, and was worded almost identically to the response she had sent previously. 40.  On 28 December 2009 the Riga Regional Court decided to continue the applicant’s involuntary inpatient treatment. The decision was amenable to appeal. The applicant received it on 11 January 2010. No appeal was lodged. 41.  The applicant was released from the hospital on 7 June 2010 on the basis of a decision of the Riga Regional Court of 27 May 2010 ordering his treatment as an outpatient.