The only female Khmer Rouge leader charged with genocide at Cambodia\'s UN-backed war crimes court is unfit to stand trial and should be freed from detention, judges said Thursday in a shock decision. The announcement -- just days before the tribunal was to hear opening statements in her trial with three co-accused -- comes after experts diagnosed former social affairs minister and \"First Lady\" Ieng Thirith with dementia. The trial chamber \"orders the release of the accused Ieng Thirith\", the judges said in a ruling after finding her \"unfit to stand trial\". Prosecutors have 24 hours to appeal against the decision. \"Unless there is an appeal, she will be released as soon as possible,\" court spokesman Lars Olsen told AFP. Court-appointed experts told the tribunal last month that Ieng Thirith, 79, suffers from memory loss and most likely has Alzheimer\'s disease. They noted that she had trouble remembering her past and once even failed to recall the name of her husband and co-accused Ieng Sary, the regime\'s former foreign affairs minister. \"Trial and continued detention of an accused who lacks capacity to understand proceedings against her or to meaningfully participate in her own defence would not serve the interests of justice,\" judges said. Ieng Thirith and three fellow senior regime members have been charged with war crimes, genocide and crimes against humanity over the deaths of up to two million people during the communist movement\'s 1975-1979 reign of terror. All four -- including \"Brother Number Two\" Nuon Chea and ex-head of state Khieu Samphan -- have been held at a purpose-built detention centre near the court since 2007. Questions have long been raised over the mental state of Ieng Thirith, who famously lost her cool during a 2009 court appearance, telling her accusers they would be \"cursed to the seventh circle of hell\". Led by \"Brother Number One\" Pol Pot, who died in 1998, the Khmer Rouge wiped out nearly a quarter of the Cambodian population through starvation, overwork and execution in a bid to create an agrarian utopia. Traditional Cambodian family life was up-ended under the regime\'s social policies, which banished religion and sought to destroy family bonds. For her role as social affairs minister, Ieng Thirith, who was also Pol Pot\'s sister-in-law, is held responsible by some researchers for the regime\'s drastic re-ordering of society. The one-time Shakespeare major remained a staunch defender of the regime and, like her co-defendants, has always denied the charges against her. \"I don\'t know why a good person is accused of such crimes and I have suffered a great deal and I cannot really be patient because I have been wrongly accused,\" she said in that 15-minute court tirade in 2009. Alternating between English and Khmer, she said \"everything was done by Nuon Chea\". In its historic first case, the tribunal sentenced former prison chief Kaing Guek Eav, also known as Duch, to 30 years in jail last year for overseeing the deaths of 15,000 people. The case is now under appeal with a ruling expected in February. The case against the four most senior surviving regime leaders is the tribunal\'s second and most important case. Amid fears that not all of the accused, who are aged between 79 and 86 and suffer from various ailments, will live to see a verdict, the court last month divided their complex case into a series of smaller trials to speed up proceedings. The first mini-trial will focus on the forced movement of population and related charges of crimes against humanity. Opening statements are to begin on November 21, though Ieng Thirith will no longer be part of these proceedings. Nuon Chea also contested his ability to stand trial in August, claiming he had problems concentrating and sitting for long periods, but the court said this week he was well enough to participate in proceedings.