4.  The applicants, who were born on 7 December 1981, 26 October 1979 and 6 May 1979 respectively, live in Samsun.
5.  The facts of the case as submitted by the parties and as they appear from the documents submitted by them, are as follows.
6.  On 15 November 1996 the applicants were arrested in the course of an investigation into activities of an illegal organisation, namely the DHKP/C (Revolutionary Party of Peoples' Liberation/Front), and taken into custody at the Samsun police headquarters. The first and the third applicants were released from custody on 16 November 1996.
7.  On 18 November 1996 Hakan Kocaoğlu, i.e. the second applicant, appeared before the Samsun public prosecutor and denied that he had been a member of any illegal organisation and had carried out any activity on behalf of any such organisation. He stated that he had merely been a bystander when the first applicant and another person wrote slogans on the walls. The prosecutor ordered the second applicant's release.
8.  The applicants were medically examined on 18 November 1996. According to the medical reports drawn up by the Samsun Forensic Medical Institute, the applicants' bodies did not bear any signs of ill-treatment.
9.  On 9 December 1996 the public prosecutor at the Ankara State Security Court filed a bill of indictment with that court, accusing the applicants of aiding and abetting an illegal organisation, namely the DHKP/C.
10.  The public prosecutor alleged that in March 1996 the first applicant had been standing watch while DHKP/C slogans were being written on the walls of a primary school and on the walls of houses. The second applicant was accused of making “DHKP/C propaganda with the aim of attracting people to join the organisation”. He was also accused of having stood watch while slogans were being written on the walls of a primary school, a block of flats and a maternity hospital in March and May 1996.  The third applicant was accused of having distributed DHKP/C leaflets on 9 October 1995 in a high school and having written DHKP/C slogans on 20 December 1995.
11.  The prosecutor sought the applicants' conviction and sentence under Article 169 of the Criminal Code and Article 5 of Law no. 3713. The prosecutor also asked the court to take into account Article 55 § 3 of the Turkish Criminal Code when sentencing the first and the third applicants. Article 55 § 3 of the Criminal Code provides for a reduction of one third of the sentences to be handed down for persons between the ages of 15 and 18.
12.  On 23 December 1996 the First Chamber of the Ankara State Security Court (hereinafter “the trial court”), which consisted of three judges, including a military judge, commenced the trial of the applicants together with twelve other co-accused.
13.  On 10 July 1997 the trial court found the second applicant guilty of membership of an illegal organisation, an offence under Article 168 § 2 of the Criminal Code, and sentenced him to eight years and four months' imprisonment. The remaining two applicants were found guilty of the offence of aiding and abetting an illegal organisation, an offence contrary to Article 169 of the Criminal Code. The first applicant was sentenced to two years and six months' imprisonment and the third applicant to three years and nine months. In sentencing the first and the second applicants, the trial court took into account Article 55 § 3 of the Criminal Code and reduced the prison sentences.
14.  It appears from the verbatim records of the hearing and from the above-mentioned decision of the trial court that the applicants were not represented by a lawyer in the course of the criminal proceedings.
15.  The applicants, this time with the assistance a lawyer, appealed against their convictions. The first applicant argued that, at the time of the commission of the offence, he had been under 15 years of age and that the trial court had failed to have regard to Article 54 of the Criminal Code which provides that persons under the age of 15 cannot be subjected to any punishment unless they are able “to distinguish right from wrong” (doli capax). The trial court should have examined, therefore, whether he had been able “to distinguish right from wrong”.
16.  The second applicant argued that in concluding that he had been a member of DHKP/C, the trial court had based itself on statements given by Ulaş Şahintürk, one of the co-accused. However, as Ulaş had been killed in prison “by the organisation on the assumption that he had been an informer”, it had not been possible to establish the accuracy of his statements.
17.  The third applicant argued, inter alia, that the trial court had failed to reduce his prison sentence notwithstanding the fact that he had been under the age of 18 at the time of the commission of the offence and should have benefited from a reduction of a third of his sentence pursuant to Article 55 § 3 of the Criminal Code.
18.  On 2 July 1998 the Court of Cassation quashed the judgment of the first‑instance court in respect of the applicants and another co-accused. It held that the trial court had not taken into account the age of the first and the third applicants at the time of the commission of the offence. The Court of Cassation further considered that the first-instance court had misinterpreted the offence in respect of the second applicant.
19.  Following the referral of the case back to the Ankara State Security Court, criminal proceedings recommenced against the applicants on 31 July 1998. In the course of these criminal proceedings, the Ankara State Security Court asked Samsun hospital to establish whether the first applicant had been able “to distinguish between right and wrong” at the time of the commission of the offence.
20.  On 8 December 1998 a medical report drafted by the Samsun psychiatric hospital was submitted to the trial court. According to that report the first applicant had been able to distinguish between right and wrong at the time of the commission of the offence. The lawyer for the applicant objected to the report, arguing that it was not possible for medical science to establish the state of mind of a person four years previously.
21.  The applicants submitted written defence petitions to the trial court. The first applicant argued that he had been twelve years old at the time of the alleged commission of the offence and that the medical report of Samsun mental hospital examining him four years after the alleged commission of the offence could not be considered to be scientifically conclusive. He claimed that his statement before the police had been extracted under torture.
22.  The second applicant claimed that there was no other evidence to convict him apart from his statement given in police custody. He relied on the police statement of the deceased Ulaş Sahintürk, who had stated that the applicants had left the organisation. He claimed that his statement before the police had been extracted under torture.
23.  The third applicant denied the accusations brought against him. He submitted that he had stopped seeing the other co-accused as soon as he understood that they wanted him to become a member of the illegal organisation. He also claimed that he had not taken part in the offences with which he was charged and alleged that his statement before the police had been extracted under torture.
24.  On 22 December 1998 the trial court convicted the applicants of the offence of membership of an illegal organisation contrary to Article 169 of the Criminal Code. Taking into account the applicants' ages at the time of the commission of the offence, the trial court sentenced the second and the third applicants to two years and six months' imprisonment and the first applicant to one year, ten months and fifteen days' imprisonment. Throughout the re-trial the applicants were represented by a lawyer. One of the three judges on the bench of the trial court was a military judge.
25.  The applicants appealed against the judgment. In their appeal petition, the applicants submitted that their right to a fair trial by an independent and impartial tribunal “as guaranteed by Article 6 of the European Convention on Human Rights” had been breached. They claimed that the statements they made while in police custody had been taken under duress and torture. Furthermore, they pointed out that the first applicant had been twelve and the second and the third applicants fifteen at the time of the alleged commission of the offence.
26.  Following a hearing on 29 June 1999, the Court of Cassation dismissed the applicants' appeal and upheld the judgment of the trial court. The decision of the Court of Cassation, which was pronounced on 7 July 1999 in the absence of the applicants' legal representative, was sent back to the registry of the State Security Court on 23 July 1999.
27.  On 19 July 1999 the applicants requested the rectification of the decision of the Court of Cassation. They submitted that, following the entry into force of Law no. 4390, they should be re-tried by a State Security Court without the presence of a military judge sitting on its bench.
28.  On 27 September 1999 the principal public prosecutor at the Court of Cassation dismissed the applicants' request for rectification.
29.  The relevant provisions of the Criminal Code read as follows:
 
Article 168
“1. Any person who, with the intention of committing the offences defined in Article 125 ..., forms an armed gang or organisation or takes leadership ... or command of such a gang or organisation or assumes some special responsibility within it shall be sentenced to not less than fifteen years' imprisonment. 2. The other members of the gang or organisation shall be sentenced to not less than five and not more than fifteen years' imprisonment.”
Article 169
“Any person, who knowing that such an armed gang or organisation is illegal, assists it, harbours its members, provides it with food, weapons and ammunition or clothes or facilitates its operations in any manner whatsoever shall be sentenced to not less than three and not more than five years' imprisonment...”
30.  Under Article 4 of the Prevention of Terrorism Act (Law no. 3713 of 12 April 1991), the offence defined in Article 169 of the Criminal Code is classified in the category of “acts committed to further the purposes of terrorism”. Pursuant to Article 5 of Law no. 3713, the penalty laid down in the Criminal Code as punishment for the offence defined in Article 4 of the Act is increased by one half.